ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [5/8] ignite git commit: GG-11732 Merged with master.
Date Thu, 06 Apr 2017 08:01:25 GMT
http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadLockInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadLockInfo.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadLockInfo.java
index 0fdd95f..1e22610 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadLockInfo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadLockInfo.java
@@ -17,57 +17,76 @@
 
 package org.apache.ignite.internal.visor.debug;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.lang.management.LockInfo;
-import org.apache.ignite.internal.LessNamingBean;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 /**
  * Data transfer object for {@link LockInfo}.
  */
-public class VisorThreadLockInfo implements Serializable, LessNamingBean {
+public class VisorThreadLockInfo extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
     /**
      * Fully qualified name of the class of the lock object.
      */
-    protected final String clsName;
+    protected String clsName;
 
     /**
      * Identity hash code of the lock object.
      */
-    protected final Integer identityHashCode;
+    protected Integer identityHashCode;
 
-    /** Create thread lock info with given parameters. */
-    public VisorThreadLockInfo(String clsName, Integer identityHashCode) {
-        assert clsName != null;
-
-        this.clsName = clsName;
-        this.identityHashCode = identityHashCode;
+    /**
+     * Default constructor.
+     */
+    public VisorThreadLockInfo() {
+        // No-op.
     }
 
-    /** Create data transfer object for given lock info. */
-    public static VisorThreadLockInfo from(LockInfo li) {
+    /**
+     * Create data transfer object for given lock info.
+     *
+     * @param li Lock info.
+     */
+    public VisorThreadLockInfo(LockInfo li) {
         assert li != null;
 
-        return new VisorThreadLockInfo(li.getClassName(), li.getIdentityHashCode());
+        clsName = li.getClassName();
+        identityHashCode = li.getIdentityHashCode();
     }
 
     /**
      * @return Fully qualified name of the class of the lock object.
      */
-    public String className() {
+    public String getClassName() {
         return clsName;
     }
 
     /**
      * @return Identity hash code of the lock object.
      */
-    public Integer identityHashCode() {
+    public Integer getIdentityHashCode() {
         return identityHashCode;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, clsName);
+        out.writeObject(identityHashCode);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        clsName = U.readString(in);
+        identityHashCode = (Integer)in.readObject();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return clsName + '@' + Integer.toHexString(identityHashCode);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadMonitorInfo.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadMonitorInfo.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadMonitorInfo.java
index cc68665..e358eee 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadMonitorInfo.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/debug/VisorThreadMonitorInfo.java
@@ -17,7 +17,11 @@
 
 package org.apache.ignite.internal.visor.debug;
 
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.lang.management.MonitorInfo;
+import org.apache.ignite.internal.util.typedef.internal.S;
 
 /**
  * Data transfer object for {@link MonitorInfo}.
@@ -27,46 +31,62 @@ public class VisorThreadMonitorInfo extends VisorThreadLockInfo {
     private static final long serialVersionUID = 0L;
 
     /** Stack depth. */
-    private final Integer stackDepth;
+    private Integer stackDepth;
 
     /** Stack frame. */
-    private final StackTraceElement stackFrame;
+    private StackTraceElement stackFrame;
 
     /**
-     * Create thread monitor info with given parameters.
-     *
-     * @param clsName Fully qualified name of the class of the lock object.
-     * @param identityHashCode Identity hash code of the lock object.
-     * @param stackDepth Depth in the stack trace where the object monitor was locked.
-     * @param stackFrame Stack frame that locked the object monitor.
+     * Default constructor.
      */
-    public VisorThreadMonitorInfo(String clsName, Integer identityHashCode, Integer stackDepth,
-        StackTraceElement stackFrame) {
-        super(clsName, identityHashCode);
-
-        this.stackDepth = stackDepth;
-        this.stackFrame = stackFrame;
+    public VisorThreadMonitorInfo() {
+        // No-op.
     }
 
-    /** Create data transfer object for given monitor info. */
-    public static VisorThreadMonitorInfo from(MonitorInfo mi) {
-        assert mi != null;
+    /**
+     * Create data transfer object for given monitor info.
+     *
+     * @param mi Monitoring info.
+     */
+    public VisorThreadMonitorInfo(MonitorInfo mi) {
+        super(mi);
 
-        return new VisorThreadMonitorInfo(mi.getClassName(), mi.getIdentityHashCode(), mi.getLockedStackDepth(),
-            mi.getLockedStackFrame());
+        stackDepth = mi.getLockedStackDepth();
+        stackFrame = mi.getLockedStackFrame();
     }
 
     /**
      * @return Stack depth.
      */
-    public Integer stackDepth() {
+    public Integer getStackDepth() {
         return stackDepth;
     }
 
     /**
      * @return Stack frame.
      */
-    public StackTraceElement stackFrame() {
+    public StackTraceElement getStackFrame() {
         return stackFrame;
     }
-}
\ No newline at end of file
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        super.writeExternalData(out);
+
+        out.writeObject(stackDepth);
+        out.writeObject(stackFrame);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        super.readExternalData(in);
+
+        stackDepth = (Integer)in.readObject();
+        stackFrame = (StackTraceElement)in.readObject();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorThreadMonitorInfo.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDeploymentEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDeploymentEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDeploymentEvent.java
index 0eefa6b..6144012 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDeploymentEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDeploymentEvent.java
@@ -17,8 +17,12 @@
 
 package org.apache.ignite.internal.visor.event;
 
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.util.UUID;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.Nullable;
 
@@ -30,7 +34,14 @@ public class VisorGridDeploymentEvent extends VisorGridEvent {
     private static final long serialVersionUID = 0L;
 
     /** Deployment alias. */
-    private final String alias;
+    private String alias;
+
+    /**
+     * Default constructor.
+     */
+    public VisorGridDeploymentEvent() {
+        // No-op.
+    }
 
     /**
      * Create event with given parameters.
@@ -62,12 +73,26 @@ public class VisorGridDeploymentEvent extends VisorGridEvent {
     /**
      * @return Deployment alias.
      */
-    public String alias() {
+    public String getAlias() {
         return alias;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        super.writeExternalData(out);
+
+        U.writeString(out, alias);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        super.readExternalData(in);
+
+        alias = U.readString(in);
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorGridDeploymentEvent.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDiscoveryEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDiscoveryEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDiscoveryEvent.java
index bad6966..ecafb8a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDiscoveryEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridDiscoveryEvent.java
@@ -17,8 +17,12 @@
 
 package org.apache.ignite.internal.visor.event;
 
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.util.UUID;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.Nullable;
 
@@ -30,16 +34,23 @@ public class VisorGridDiscoveryEvent extends VisorGridEvent {
     private static final long serialVersionUID = 0L;
 
     /** Node that caused this event to be generated. */
-    private final UUID evtNodeId;
+    private UUID evtNodeId;
 
     /** Node address that caused this event to be generated. */
-    private final String addr;
+    private String addr;
 
     /** If node that caused this event is daemon. */
-    private final boolean isDaemon;
+    private boolean isDaemon;
 
     /** Topology version. */
-    private final long topVer;
+    private long topVer;
+
+    /**
+     * Default constructor.
+     */
+    public VisorGridDiscoveryEvent() {
+        // No-op.
+    }
 
     /**
      * Create event with given parameters.
@@ -87,7 +98,7 @@ public class VisorGridDiscoveryEvent extends VisorGridEvent {
     /**
      * @return Node address that caused this event to be generated.
      */
-    public String address() {
+    public String getAddress() {
         return addr;
     }
 
@@ -102,11 +113,31 @@ public class VisorGridDiscoveryEvent extends VisorGridEvent {
      * @return Topology version or {@code 0} if configured discovery SPI implementation
      *      does not support versioning.
      **/
-    public long topologyVersion() {
+    public long getTopologyVersion() {
         return topVer;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        super.writeExternalData(out);
+
+        U.writeUuid(out, evtNodeId);
+        U.writeString(out, addr);
+        out.writeBoolean(isDaemon);
+        out.writeLong(topVer);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        super.readExternalData(in);
+
+        evtNodeId = U.readUuid(in);
+        addr = U.readString(in);
+        isDaemon = in.readBoolean();
+        topVer = in.readLong();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorGridDiscoveryEvent.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEvent.java
index b24e860..c0e4162 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEvent.java
@@ -17,40 +17,50 @@
 
 package org.apache.ignite.internal.visor.event;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.util.UUID;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.Nullable;
 
 /**
  * Base class for lightweight counterpart for various {@link org.apache.ignite.events.Event}.
  */
-public class VisorGridEvent implements Serializable, LessNamingBean {
+public class VisorGridEvent extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
     /** Event type. */
-    private final int typeId;
+    private int typeId;
 
     /** Globally unique ID of this event. */
-    private final IgniteUuid id;
+    private IgniteUuid id;
 
     /** Name of this event. */
-    private final String name;
+    private String name;
 
     /** Node Id where event occurred and was recorded. */
-    private final UUID nid;
+    private UUID nid;
 
     /** Event timestamp. */
-    private final long ts;
+    private long ts;
 
     /** Event message. */
-    private final String msg;
+    private String msg;
 
     /** Shortened version of {@code toString()} result. Suitable for humans to read. */
-    private final String shortDisplay;
+    private String shortDisplay;
+
+    /**
+     * Default constructor.
+     */
+    public VisorGridEvent() {
+        // No-op.
+    }
 
     /**
      * Create event with given parameters.
@@ -77,53 +87,75 @@ public class VisorGridEvent implements Serializable, LessNamingBean {
     /**
      * @return Event type.
      */
-    public int typeId() {
+    public int getTypeId() {
         return typeId;
     }
 
     /**
      * @return Globally unique ID of this event.
      */
-    public IgniteUuid id() {
+    public IgniteUuid getId() {
         return id;
     }
 
     /**
      * @return Name of this event.
      */
-    public String name() {
+    public String getName() {
         return name;
     }
 
     /**
      * @return Node Id where event occurred and was recorded.
      */
-    public UUID nid() {
+    public UUID getNid() {
         return nid;
     }
 
     /**
      * @return Event timestamp.
      */
-    public long timestamp() {
+    public long getTimestamp() {
         return ts;
     }
 
     /**
      * @return Event message.
      */
-    @Nullable public String message() {
+    @Nullable public String getMessage() {
         return msg;
     }
 
     /**
      * @return Shortened version of  result. Suitable for humans to read.
      */
-    public String shortDisplay() {
+    public String getShortDisplay() {
         return shortDisplay;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        out.writeInt(typeId);
+        U.writeGridUuid(out, id);
+        U.writeString(out, name);
+        U.writeUuid(out, nid);
+        out.writeLong(ts);
+        U.writeString(out, msg);
+        U.writeString(out, shortDisplay);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        typeId = in.readInt();
+        id = U.readGridUuid(in);
+        name = U.readString(in);
+        nid = U.readUuid(in);
+        ts = in.readLong();
+        msg = U.readString(in);
+        shortDisplay = U.readString(in);
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorGridEvent.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEventsLost.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEventsLost.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEventsLost.java
index 92f149a..e07a3a1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEventsLost.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridEventsLost.java
@@ -18,6 +18,7 @@
 package org.apache.ignite.internal.visor.event;
 
 import java.util.UUID;
+import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteUuid;
 
@@ -29,6 +30,13 @@ public class VisorGridEventsLost extends VisorGridEvent {
     private static final long serialVersionUID = 0L;
 
     /**
+     * Default constructor.
+     */
+    public VisorGridEventsLost() {
+        // No-op.
+    }
+
+    /**
      * Create event with given parameters.
      *
      * @param nid Node where events were lost.
@@ -38,4 +46,9 @@ public class VisorGridEventsLost extends VisorGridEvent {
             "Some Visor events were lost and Visor may show inconsistent results. " +
             "Configure your grid to disable not important events.", "");
     }
-}
\ No newline at end of file
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorGridEventsLost.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridJobEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridJobEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridJobEvent.java
index a1a0c04..47b5002 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridJobEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridJobEvent.java
@@ -17,8 +17,12 @@
 
 package org.apache.ignite.internal.visor.event;
 
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.util.UUID;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.Nullable;
 
@@ -30,16 +34,23 @@ public class VisorGridJobEvent extends VisorGridEvent {
     private static final long serialVersionUID = 0L;
 
     /** Name of the task that triggered the event. */
-    private final String taskName;
+    private String taskName;
 
     /** Name of task class that triggered the event. */
-    private final String taskClsName;
+    private String taskClsName;
 
     /** Task session ID of the task that triggered the event. */
-    private final IgniteUuid taskSesId;
+    private IgniteUuid taskSesId;
 
     /** Job ID. */
-    private final IgniteUuid jobId;
+    private IgniteUuid jobId;
+
+    /**
+     * Default constructor.
+     */
+    public VisorGridJobEvent() {
+        // No-op.
+    }
 
     /**
      * Create event with given parameters.
@@ -80,33 +91,53 @@ public class VisorGridJobEvent extends VisorGridEvent {
     /**
      * @return Name of the task that triggered the event.
      */
-    public String taskName() {
+    public String getTaskName() {
         return taskName;
     }
 
     /**
      * @return Name of task class that triggered the event.
      */
-    public String taskClassName() {
+    public String getTaskClassName() {
         return taskClsName;
     }
 
     /**
      * @return Task session ID of the task that triggered the event.
      */
-    public IgniteUuid taskSessionId() {
+    public IgniteUuid getTaskSessionId() {
         return taskSesId;
     }
 
     /**
      * @return Job ID.
      */
-    public IgniteUuid jobId() {
+    public IgniteUuid getJobId() {
         return jobId;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        super.writeExternalData(out);
+
+        U.writeString(out, taskName);
+        U.writeString(out, taskClsName);
+        U.writeGridUuid(out, taskSesId);
+        U.writeGridUuid(out, jobId);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        super.readExternalData(in);
+
+        taskName = U.readString(in);
+        taskClsName = U.readString(in);
+        taskSesId = U.readGridUuid(in);
+        jobId = U.readGridUuid(in);
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorGridJobEvent.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridTaskEvent.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridTaskEvent.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridTaskEvent.java
index 255d559..530ae41 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridTaskEvent.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/event/VisorGridTaskEvent.java
@@ -17,8 +17,12 @@
 
 package org.apache.ignite.internal.visor.event;
 
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.util.UUID;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.lang.IgniteUuid;
 import org.jetbrains.annotations.Nullable;
 
@@ -30,16 +34,23 @@ public class VisorGridTaskEvent extends VisorGridEvent {
     private static final long serialVersionUID = 0L;
 
     /** Name of the task that triggered the event. */
-    private final String taskName;
+    private String taskName;
 
     /** Name of task class that triggered the event. */
-    private final String taskClsName;
+    private String taskClsName;
 
     /** Task session ID. */
-    private final IgniteUuid taskSesId;
+    private IgniteUuid taskSesId;
 
     /** Whether task was created for system needs. */
-    private final boolean internal;
+    private boolean internal;
+
+    /**
+     * Default constructor.
+     */
+    public VisorGridTaskEvent() {
+        // No-op.
+    }
 
     /**
      * Create event with given parameters.
@@ -80,33 +91,53 @@ public class VisorGridTaskEvent extends VisorGridEvent {
     /**
      * @return Name of the task that triggered the event.
      */
-    public String taskName() {
+    public String getTaskName() {
         return taskName;
     }
 
     /**
      * @return Name of task class that triggered the event.
      */
-    public String taskClassName() {
+    public String getTaskClassName() {
         return taskClsName;
     }
 
     /**
      * @return Task session ID.
      */
-    public IgniteUuid taskSessionId() {
+    public IgniteUuid getTaskSessionId() {
         return taskSesId;
     }
 
     /**
      * @return Whether task was created for system needs.
      */
-    public boolean internal() {
+    public boolean isInternal() {
         return internal;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        super.writeExternalData(out);
+
+        U.writeString(out, taskName);
+        U.writeString(out, taskClsName);
+        U.writeGridUuid(out, taskSesId);
+        out.writeBoolean(internal);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        super.readExternalData(in);
+
+        taskName = U.readString(in);
+        taskClsName = U.readString(in);
+        taskSesId = U.readGridUuid(in);
+        internal = in.readBoolean();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorGridTaskEvent.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlock.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlock.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlock.java
index dba7037..4746a8d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlock.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlock.java
@@ -17,34 +17,44 @@
 
 package org.apache.ignite.internal.visor.file;
 
-import java.io.Serializable;
-import org.apache.ignite.internal.LessNamingBean;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 /**
  * Represents block of bytes from a file, could be optionally zipped.
  */
-public class VisorFileBlock implements Serializable, LessNamingBean {
+public class VisorFileBlock extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
     /** File path. */
-    private final String path;
+    private String path;
 
     /** Marker position. */
-    private final long off;
+    private long off;
 
     /** File size. */
-    private final long size;
+    private long size;
 
     /** Timestamp of last modification of the file. */
-    private final long lastModified;
+    private long lastModified;
 
     /** Whether data was zipped. */
-    private final boolean zipped;
+    private boolean zipped;
 
     /** Data bytes. */
-    private final byte[] data;
+    private byte[] data;
+
+    /**
+     * Default constructor.
+     */
+    public VisorFileBlock() {
+
+    }
 
     /**
      * Create file block with given parameters.
@@ -68,46 +78,66 @@ public class VisorFileBlock implements Serializable, LessNamingBean {
     /**
      * @return File path.
      */
-    public String path() {
+    public String getPath() {
         return path;
     }
 
     /**
      * @return Marker position.
      */
-    public long offset() {
+    public long getOffset() {
         return off;
     }
 
     /**
      * @return File size.
      */
-    public long size() {
+    public long getSize() {
         return size;
     }
 
     /**
      * @return Timestamp of last modification of the file.
      */
-    public long lastModified() {
+    public long getLastModified() {
         return lastModified;
     }
 
     /**
      * @return Whether data was zipped.
      */
-    public boolean zipped() {
+    public boolean isZipped() {
         return zipped;
     }
 
     /**
      * @return Data bytes.
      */
-    public byte[] data() {
+    public byte[] getData() {
         return data;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, path);
+        out.writeLong(off);
+        out.writeLong(size);
+        out.writeLong(lastModified);
+        out.writeBoolean(zipped);
+        U.writeByteArray(out, data);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        path = U.readString(in);
+        off = in.readLong();
+        size = in.readLong();
+        lastModified = in.readLong();
+        zipped = in.readBoolean();
+        data = U.readByteArray(in);
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorFileBlock.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockArg.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockArg.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockArg.java
new file mode 100644
index 0000000..0a5175f
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockArg.java
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.file;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
+
+/**
+ * Arguments for {@link VisorFileBlockTask}
+ */
+@SuppressWarnings("PublicInnerClass")
+public class VisorFileBlockArg extends VisorDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Log file path. */
+    private String path;
+
+    /** Log file offset. */
+    private long off;
+
+    /** Block size. */
+    private int blockSz;
+
+    /** Log file last modified timestamp. */
+    private long lastModified;
+
+    /**
+     * Default constructor.
+     */
+    public VisorFileBlockArg() {
+        // No-op.
+    }
+
+    /**
+     * @param path Log file path.
+     * @param off Offset in file.
+     * @param blockSz Block size.
+     * @param lastModified Log file last modified timestamp.
+     */
+    public VisorFileBlockArg(String path, long off, int blockSz, long lastModified) {
+        this.path = path;
+        this.off = off;
+        this.blockSz = blockSz;
+        this.lastModified = lastModified;
+    }
+
+    /**
+     * @return Log file path.
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * @return Log file offset.
+     */
+    public long getOffset() {
+        return off;
+    }
+
+    /**
+     * @return Block size
+     */
+    public int getBlockSize() {
+        return blockSz;
+    }
+
+    /**
+     * @return Log file last modified timestamp.
+     */
+    public long getLastModified() {
+        return lastModified;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, path);
+        out.writeLong(off);
+        out.writeInt(blockSz);
+        out.writeLong(lastModified);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        path = U.readString(in);
+        off = in.readLong();
+        blockSz = in.readInt();
+        lastModified = in.readLong();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorFileBlockArg.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java
index 58a25ee..298c14e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTask.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.visor.file;
 
 import java.io.File;
 import java.io.IOException;
-import java.io.Serializable;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.nio.file.NoSuchFileException;
@@ -36,8 +35,7 @@ import static org.apache.ignite.internal.visor.util.VisorTaskUtils.readBlock;
  * Task to read file block.
  */
 @GridInternal
-public class VisorFileBlockTask extends VisorOneNodeTask<VisorFileBlockTask.VisorFileBlockArg,
-    IgniteBiTuple<? extends IOException, VisorFileBlock>> {
+public class VisorFileBlockTask extends VisorOneNodeTask<VisorFileBlockArg, VisorFileBlockTaskResult> {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -47,49 +45,10 @@ public class VisorFileBlockTask extends VisorOneNodeTask<VisorFileBlockTask.Viso
     }
 
     /**
-     * Arguments for {@link VisorFileBlockTask}
-     */
-    @SuppressWarnings("PublicInnerClass")
-    public static class VisorFileBlockArg implements Serializable {
-        /** */
-        private static final long serialVersionUID = 0L;
-
-        /** Log file path. */
-        private final String path;
-
-        /** Log file offset. */
-        private final long off;
-
-        /** Block size. */
-        private final int blockSz;
-
-        /** Log file last modified timestamp. */
-        private final long lastModified;
-
-        /**
-         * @param path Log file path.
-         * @param off Offset in file.
-         * @param blockSz Block size.
-         * @param lastModified Log file last modified timestamp.
-         */
-        public VisorFileBlockArg(String path, long off, int blockSz, long lastModified) {
-            this.path = path;
-            this.off = off;
-            this.blockSz = blockSz;
-            this.lastModified = lastModified;
-        }
-
-        /** {@inheritDoc} */
-        @Override public String toString() {
-            return S.toString(VisorFileBlockArg.class, this);
-        }
-    }
-
-    /**
      * Job that read file block on node.
      */
     private static class VisorFileBlockJob
-        extends VisorJob<VisorFileBlockArg, IgniteBiTuple<? extends IOException, VisorFileBlock>> {
+        extends VisorJob<VisorFileBlockArg, VisorFileBlockTaskResult> {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -102,22 +61,25 @@ public class VisorFileBlockTask extends VisorOneNodeTask<VisorFileBlockTask.Viso
         }
 
         /** {@inheritDoc} */
-        @Override protected IgniteBiTuple<? extends IOException, VisorFileBlock> run(VisorFileBlockArg arg) {
+        @Override protected VisorFileBlockTaskResult run(VisorFileBlockArg arg) {
             try {
-                URL url = U.resolveIgniteUrl(arg.path);
+                URL url = U.resolveIgniteUrl(arg.getPath());
 
                 if (url == null)
-                    return new IgniteBiTuple<>(new NoSuchFileException("File path not found: " + arg.path), null);
+                    return new VisorFileBlockTaskResult(
+                        new NoSuchFileException("File path not found: " + arg.getPath()), null);
 
-                VisorFileBlock block = readBlock(new File(url.toURI()), arg.off, arg.blockSz, arg.lastModified);
+                VisorFileBlock block = readBlock(
+                    new File(url.toURI()), arg.getOffset(), arg.getBlockSize(), arg.getLastModified());
 
-                return new IgniteBiTuple<>(null, block);
+                return new VisorFileBlockTaskResult(null, block);
             }
             catch (IOException e) {
-                return new IgniteBiTuple<>(e, null);
+                return new VisorFileBlockTaskResult(e, null);
             }
             catch (URISyntaxException ignored) {
-                return new IgniteBiTuple<>(new NoSuchFileException("File path not found: " + arg.path), null);
+                return new VisorFileBlockTaskResult(
+                    new NoSuchFileException("File path not found: " + arg.getPath()), null);
             }
         }
 
@@ -126,4 +88,4 @@ public class VisorFileBlockTask extends VisorOneNodeTask<VisorFileBlockTask.Viso
             return S.toString(VisorFileBlockJob.class, this);
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTaskResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTaskResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTaskResult.java
new file mode 100644
index 0000000..049a4f4
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorFileBlockTaskResult.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.file;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
+
+/**
+ * Result for file block operation.
+ */
+public class VisorFileBlockTaskResult extends VisorDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Exception on reading of block. */
+    private IOException ex;
+
+    /** Read file block. */
+    private VisorFileBlock block;
+
+    /**
+     * Default constructor.
+     */
+    public VisorFileBlockTaskResult() {
+        // No-op.
+    }
+
+    /**
+     * Create log search result with given parameters.
+     *
+     * @param ex Exception on reading of block.
+     * @param block Read file block.
+     */
+    public VisorFileBlockTaskResult(IOException ex, VisorFileBlock block) {
+        this.ex = ex;
+        this.block = block;
+    }
+
+    /**
+     * @return Exception on reading of block.
+     */
+    public IOException getException() {
+        return ex;
+    }
+
+    /**
+     * @return Read file block.
+     */
+    public VisorFileBlock getBlock() {
+        return block;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        out.writeObject(ex);
+        out.writeObject(block);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        ex = (IOException)in.readObject();
+        block = (VisorFileBlock)in.readObject();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorFileBlockTaskResult.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTask.java
index 55d358c..6563ad7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTask.java
@@ -38,19 +38,19 @@ import static org.apache.ignite.internal.visor.util.VisorTaskUtils.matchedFiles;
  * Get list files matching filter.
  */
 @GridInternal
-public class VisorLatestTextFilesTask extends VisorOneNodeTask<IgniteBiTuple<String, String>, Collection<VisorLogFile>> {
+public class VisorLatestTextFilesTask extends VisorOneNodeTask<VisorLatestTextFilesTaskArg, Collection<VisorLogFile>> {
     /** */
     private static final long serialVersionUID = 0L;
 
     /** {@inheritDoc} */
-    @Override protected VisorLatestTextFilesJob job(IgniteBiTuple<String, String> arg) {
+    @Override protected VisorLatestTextFilesJob job(VisorLatestTextFilesTaskArg arg) {
         return new VisorLatestTextFilesJob(arg, debug);
     }
 
     /**
      * Job that gets list of files.
      */
-    private static class VisorLatestTextFilesJob extends VisorJob<IgniteBiTuple<String, String>, Collection<VisorLogFile>> {
+    private static class VisorLatestTextFilesJob extends VisorJob<VisorLatestTextFilesTaskArg, Collection<VisorLogFile>> {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -58,14 +58,14 @@ public class VisorLatestTextFilesTask extends VisorOneNodeTask<IgniteBiTuple<Str
          * @param arg Folder and regexp.
          * @param debug Debug flag.
          */
-        private VisorLatestTextFilesJob(IgniteBiTuple<String, String> arg, boolean debug) {
+        private VisorLatestTextFilesJob(VisorLatestTextFilesTaskArg arg, boolean debug) {
             super(arg, debug);
         }
 
         /** {@inheritDoc} */
-        @Nullable @Override protected Collection<VisorLogFile> run(final IgniteBiTuple<String, String> arg) {
-            String path = arg.get1();
-            String regexp = arg.get2();
+        @Nullable @Override protected Collection<VisorLogFile> run(final VisorLatestTextFilesTaskArg arg) {
+            String path = arg.getPath();
+            String regexp = arg.getRegexp();
 
             assert path != null;
             assert regexp != null;
@@ -98,4 +98,4 @@ public class VisorLatestTextFilesTask extends VisorOneNodeTask<IgniteBiTuple<Str
             return S.toString(VisorLatestTextFilesJob.class, this);
         }
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTaskArg.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTaskArg.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTaskArg.java
new file mode 100644
index 0000000..1667fb2
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/file/VisorLatestTextFilesTaskArg.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.file;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
+
+/**
+ * Arguments for {@link VisorLatestTextFilesTask}
+ */
+@SuppressWarnings("PublicInnerClass")
+public class VisorLatestTextFilesTaskArg extends VisorDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Folder path to search files. */
+    private String path;
+
+    /** Pattern to match file names. */
+    private String regexp;
+
+    /**
+     * Default constructor.
+     */
+    public VisorLatestTextFilesTaskArg() {
+        // No-op.
+    }
+
+    /**
+     * @param path Folder path to search in files.
+     * @param regexp Pattern to match file names.
+     */
+    public VisorLatestTextFilesTaskArg(String path, String regexp) {
+        this.path = path;
+        this.regexp = regexp;
+    }
+
+    /**
+     * @return Folder path to search in files.
+     */
+    public String getPath() {
+        return path;
+    }
+
+    /**
+     * @return Pattern to match file names.
+     */
+    public String getRegexp() {
+        return regexp;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, path);
+        U.writeString(out, regexp);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        path = U.readString(in);
+        regexp = U.readString(in);
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorLatestTextFilesTaskArg.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java
index 114d92d..3957881 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfs.java
@@ -17,45 +17,50 @@
 
 package org.apache.ignite.internal.visor.igfs;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import org.apache.ignite.IgniteFileSystem;
 import org.apache.ignite.igfs.IgfsMode;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 /**
- * Data transfer object for {@link org.apache.ignite.IgniteFileSystem}.
+ * Data transfer object for {@link IgniteFileSystem}.
  */
-public class VisorIgfs implements Serializable, LessNamingBean {
+public class VisorIgfs extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
     /** IGFS instance name. */
-    private final String name;
+    private String name;
 
     /** IGFS instance working mode. */
-    private final IgfsMode mode;
+    private IgfsMode mode;
 
     /** IGFS metrics. */
-    private final VisorIgfsMetrics metrics;
+    private VisorIgfsMetrics metrics;
 
     /** Whether IGFS has configured secondary file system. */
-    private final boolean secondaryFsConfigured;
+    private boolean secondaryFsConfigured;
 
     /**
-     * Create data transfer object.
+     * Default constructor.
+     */
+    public VisorIgfs() {
+        // No-op.
+    }
+
+    /**
+     * Create IGFS configuration transfer object.
      *
-     * @param name IGFS name.
-     * @param mode IGFS mode.
+     * @param name IGFS instance name.
+     * @param mode IGFS instance working mode.
      * @param metrics IGFS metrics.
      * @param secondaryFsConfigured Whether IGFS has configured secondary file system.
      */
-    public VisorIgfs(
-        String name,
-        IgfsMode mode,
-        VisorIgfsMetrics metrics,
-        boolean secondaryFsConfigured
-    ) {
+    public VisorIgfs(String name, IgfsMode mode, VisorIgfsMetrics metrics, boolean secondaryFsConfigured) {
         this.name = name;
         this.mode = mode;
         this.metrics = metrics;
@@ -63,49 +68,64 @@ public class VisorIgfs implements Serializable, LessNamingBean {
     }
 
     /**
+     * Create data transfer object.
+     *
      * @param igfs Source IGFS.
-     * @return Data transfer object for given IGFS.
      */
-    public static VisorIgfs from(IgniteFileSystem igfs) {
+    public VisorIgfs(IgniteFileSystem igfs) {
         assert igfs != null;
 
-        return new VisorIgfs(
-            igfs.name(),
-            igfs.configuration().getDefaultMode(),
-            VisorIgfsMetrics.from(igfs),
-            igfs.configuration().getSecondaryFileSystem() != null
-        );
+        name = igfs.name();
+        mode = igfs.configuration().getDefaultMode();
+        metrics = new VisorIgfsMetrics(igfs);
+        secondaryFsConfigured = igfs.configuration().getSecondaryFileSystem() != null;
     }
 
     /**
      * @return IGFS instance name.
      */
-    public String name() {
+    public String getName() {
         return name;
     }
 
     /**
      * @return IGFS instance working mode.
      */
-    public IgfsMode mode() {
+    public IgfsMode getMode() {
         return mode;
     }
 
     /**
      * @return IGFS metrics.
      */
-    public VisorIgfsMetrics metrics() {
+    public VisorIgfsMetrics getMetrics() {
         return metrics;
     }
 
     /**
      * @return Whether IGFS has configured secondary file system.
      */
-    public boolean secondaryFileSystemConfigured() {
+    public boolean isSecondaryFileSystemConfigured() {
         return secondaryFsConfigured;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, name);
+        U.writeEnum(out, mode);
+        out.writeObject(metrics);
+        out.writeBoolean(secondaryFsConfigured);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        name = U.readString(in);
+        mode = IgfsMode.fromOrdinal(in.readByte());
+        metrics = (VisorIgfsMetrics)in.readObject();
+        secondaryFsConfigured = in.readBoolean();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorIgfs.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java
index 8ddd883..d068abf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsEndpoint.java
@@ -17,43 +17,51 @@
 
 package org.apache.ignite.internal.visor.igfs;
 
-import java.io.Serializable;
-import org.apache.ignite.internal.LessNamingBean;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 import org.jetbrains.annotations.Nullable;
 
 /**
  * IGFS endpoint descriptor.
  */
-public class VisorIgfsEndpoint implements Serializable, LessNamingBean {
+public class VisorIgfsEndpoint extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
     /** IGFS name. */
-    private final String igfsName;
+    private String igfsName;
 
-    /** Ignite instance name. */
-    private final String igniteInstanceName;
+    /** Grid name. */
+    private String gridName;
 
     /** Host address / name. */
-    private final String hostName;
+    private String hostName;
 
     /** Port number. */
-    private final int port;
+    private int port;
+
+    /**
+     * Default constructor.
+     */
+    public VisorIgfsEndpoint() {
+        // No-op.
+    }
 
     /**
      * Create IGFS endpoint descriptor with given parameters.
      *
      * @param igfsName IGFS name.
-     * @param igniteInstanceName Ignite instance name.
+     * @param gridName Grid name.
      * @param hostName Host address / name.
      * @param port Port number.
      */
-    public VisorIgfsEndpoint(
-        @Nullable String igfsName, String igniteInstanceName, @Nullable String hostName, int port
-    ) {
+    public VisorIgfsEndpoint(@Nullable String igfsName, String gridName, @Nullable String hostName, int port) {
         this.igfsName = igfsName;
-        this.igniteInstanceName = igniteInstanceName;
+        this.gridName = gridName;
         this.hostName = hostName;
         this.port = port;
     }
@@ -61,45 +69,61 @@ public class VisorIgfsEndpoint implements Serializable, LessNamingBean {
     /**
      * @return IGFS name.
      */
-    @Nullable public String igfsName() {
+    @Nullable public String getIgfsName() {
         return igfsName;
     }
 
     /**
-     * @return Ignite instance name.
+     * @return Grid name.
      */
-    public String igniteInstanceName() {
-        return igniteInstanceName;
+    public String getGridName() {
+        return gridName;
     }
 
     /**
      * @return Host address / name.
      */
-    @Nullable public String hostName() {
+    @Nullable public String getHostName() {
         return hostName;
     }
 
     /**
      * @return Port number.
      */
-    public int port() {
+    public int getPort() {
         return port;
     }
 
     /**
      * @return URI Authority
      */
-    public String authority() {
+    public String getAuthority() {
         String addr = hostName + ":" + port;
 
-        if (igfsName == null && igniteInstanceName == null)
+        if (igfsName == null && gridName == null)
             return addr;
         else if (igfsName == null)
-            return igniteInstanceName + "@" + addr;
-        else if (igniteInstanceName == null)
+            return gridName + "@" + addr;
+        else if (gridName == null)
             return igfsName + "@" + addr;
         else
-            return igfsName + ":" + igniteInstanceName + "@" + addr;
+            return igfsName + ":" + gridName + "@" + addr;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, igfsName);
+        U.writeString(out, gridName);
+        U.writeString(out, hostName);
+        out.writeInt(port);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        igfsName = U.readString(in);
+        gridName = U.readString(in);
+        hostName = U.readString(in);
+        port = in.readInt();
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsMetrics.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsMetrics.java
index 58acee1..49a6bdd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsMetrics.java
@@ -17,16 +17,18 @@
 
 package org.apache.ignite.internal.visor.igfs;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import org.apache.ignite.IgniteFileSystem;
 import org.apache.ignite.igfs.IgfsMetrics;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 /**
  * Data transfer object for {@link IgfsMetrics}.
  */
-public class VisorIgfsMetrics implements Serializable, LessNamingBean {
+public class VisorIgfsMetrics extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -73,32 +75,36 @@ public class VisorIgfsMetrics implements Serializable, LessNamingBean {
     private long bytesWrtTm;
 
     /**
+     * Create data transfer object for given IGFS metrics.
+     */
+    public VisorIgfsMetrics() {
+        // No-op.
+    }
+
+    /**
+     * Create data transfer object for given IGFS metrics.
+     *
      * @param igfs Source IGFS.
-     * @return Data transfer object for given IGFS metrics.
      */
-    public static VisorIgfsMetrics from(IgniteFileSystem igfs) {
+    public VisorIgfsMetrics(IgniteFileSystem igfs) {
         assert igfs != null;
 
         IgfsMetrics m = igfs.metrics();
 
-        VisorIgfsMetrics metrics = new VisorIgfsMetrics();
-
-        metrics.totalSpaceSz = igfs.configuration().getMaxSpaceSize();
-        metrics.usedSpaceSz = m.localSpaceSize();
-        metrics.foldersCnt = m.directoriesCount();
-        metrics.filesCnt = m.filesCount();
-        metrics.filesOpenedForRd = m.filesOpenedForRead();
-        metrics.filesOpenedForWrt = m.filesOpenedForWrite();
-        metrics.blocksRd = m.blocksReadTotal();
-        metrics.blocksRdRmt = m.blocksReadRemote();
-        metrics.blocksWrt = m.blocksWrittenTotal();
-        metrics.blocksWrtRmt = m.blocksWrittenRemote();
-        metrics.bytesRd = m.bytesRead();
-        metrics.bytesRdTm = m.bytesReadTime();
-        metrics.bytesWrt = m.bytesWritten();
-        metrics.bytesWrtTm = m.bytesWriteTime();
-
-        return metrics;
+        totalSpaceSz = igfs.configuration().getMaxSpaceSize();
+        usedSpaceSz = m.localSpaceSize();
+        foldersCnt = m.directoriesCount();
+        filesCnt = m.filesCount();
+        filesOpenedForRd = m.filesOpenedForRead();
+        filesOpenedForWrt = m.filesOpenedForWrite();
+        blocksRd = m.blocksReadTotal();
+        blocksRdRmt = m.blocksReadRemote();
+        blocksWrt = m.blocksWrittenTotal();
+        blocksWrtRmt = m.blocksWrittenRemote();
+        bytesRd = m.bytesRead();
+        bytesRdTm = m.bytesReadTime();
+        bytesWrt = m.bytesWritten();
+        bytesWrtTm = m.bytesWriteTime();
     }
 
     /**
@@ -146,109 +152,145 @@ public class VisorIgfsMetrics implements Serializable, LessNamingBean {
     /**
      * @return Maximum amount of data that can be stored on local node.
      */
-    public long totalSpaceSize() {
+    public long getTotalSpaceSize() {
         return totalSpaceSz;
     }
 
     /**
      * @return Local used space in bytes on local node.
      */
-    public long usedSpaceSize() {
+    public long getUsedSpaceSize() {
         return usedSpaceSz;
     }
 
     /**
      * @return Local free space in bytes on local node.
      */
-    public long freeSpaceSize() {
+    public long getFreeSpaceSize() {
         return totalSpaceSz - usedSpaceSz;
     }
 
     /**
      * @return Number of directories created in file system.
      */
-    public int foldersCount() {
+    public int getFoldersCount() {
         return foldersCnt;
     }
 
     /**
      * @return Number of files stored in file system.
      */
-    public int filesCount() {
+    public int getFilesCount() {
         return filesCnt;
     }
 
     /**
      * @return Number of files that are currently opened for reading on local node.
      */
-    public int filesOpenedForRead() {
+    public int getFilesOpenedForRead() {
         return filesOpenedForRd;
     }
 
     /**
      * @return Number of files that are currently opened for writing on local node.
      */
-    public int filesOpenedForWrite() {
+    public int getFilesOpenedForWrite() {
         return filesOpenedForWrt;
     }
 
     /**
      * @return Total blocks read, local and remote.
      */
-    public long blocksRead() {
+    public long getBlocksRead() {
         return blocksRd;
     }
 
     /**
      * @return Total remote blocks read.
      */
-    public long blocksReadRemote() {
+    public long getBlocksReadRemote() {
         return blocksRdRmt;
     }
 
     /**
      * @return Total blocks write, local and remote.
      */
-    public long blocksWritten() {
+    public long getBlocksWritten() {
         return blocksWrt;
     }
 
     /**
      * @return Total remote blocks write.
      */
-    public long blocksWrittenRemote() {
+    public long getBlocksWrittenRemote() {
         return blocksWrtRmt;
     }
 
     /**
      * @return Total bytes read.
      */
-    public long bytesRead() {
+    public long getBytesRead() {
         return bytesRd;
     }
 
     /**
      * @return Total bytes read time.
      */
-    public long bytesReadTime() {
+    public long getBytesReadTime() {
         return bytesRdTm;
     }
 
     /**
      * @return Total bytes write.
      */
-    public long bytesWritten() {
+    public long getBytesWritten() {
         return bytesWrt;
     }
 
     /**
      * @return Total bytes write time.
      */
-    public long bytesWriteTime() {
+    public long getBytesWriteTime() {
         return bytesWrtTm;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        out.writeLong(totalSpaceSz);
+        out.writeLong(usedSpaceSz);
+        out.writeInt(foldersCnt);
+        out.writeInt(filesCnt);
+        out.writeInt(filesOpenedForRd);
+        out.writeInt(filesOpenedForWrt);
+        out.writeLong(blocksRd);
+        out.writeLong(blocksRdRmt);
+        out.writeLong(blocksWrt);
+        out.writeLong(blocksWrtRmt);
+        out.writeLong(bytesRd);
+        out.writeLong(bytesRdTm);
+        out.writeLong(bytesWrt);
+        out.writeLong(bytesWrtTm);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        totalSpaceSz = in.readLong();
+        usedSpaceSz = in.readLong();
+        foldersCnt = in.readInt();
+        filesCnt = in.readInt();
+        filesOpenedForRd = in.readInt();
+        filesOpenedForWrt = in.readInt();
+        blocksRd = in.readLong();
+        blocksRdRmt = in.readLong();
+        blocksWrt = in.readLong();
+        blocksWrtRmt = in.readLong();
+        bytesRd = in.readLong();
+        bytesRdTm = in.readLong();
+        bytesWrt = in.readLong();
+        bytesWrtTm = in.readLong();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorIgfsMetrics.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfiler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfiler.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfiler.java
index 06460d5..e6b40fa 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfiler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfiler.java
@@ -44,7 +44,7 @@ public class VisorIgfsProfiler {
         if (entries.size() == 1)
             return entries.get(0); // No need to aggregate.
         else {
-            String path = entries.get(0).path();
+            String path = entries.get(0).getPath();
 
             Collections.sort(entries, VisorIgfsProfilerEntry.ENTRY_TIMESTAMP_COMPARATOR);
 
@@ -61,23 +61,23 @@ public class VisorIgfsProfiler {
 
             for (VisorIgfsProfilerEntry entry : entries) {
                 // Take last timestamp.
-                ts = entry.timestamp();
+                ts = entry.getTimestamp();
 
                 // Take last size.
-                size = entry.size();
+                size = entry.getSize();
 
                 // Take last mode.
-                mode = entry.mode();
+                mode = entry.getMode();
 
                 // Aggregate metrics.
-                bytesRead += entry.bytesRead();
-                readTime += entry.readTime();
-                userReadTime += entry.userReadTime();
-                bytesWritten += entry.bytesWritten();
-                writeTime += entry.writeTime();
-                userWriteTime += entry.userWriteTime();
+                bytesRead += entry.getBytesRead();
+                readTime += entry.getReadTime();
+                userReadTime += entry.getUserReadTime();
+                bytesWritten += entry.getBytesWritten();
+                writeTime += entry.getWriteTime();
+                userWriteTime += entry.getUserWriteTime();
 
-                counters.aggregate(entry.counters());
+                counters.aggregate(entry.getCounters());
             }
 
             return new VisorIgfsProfilerEntry(path, ts, mode, size, bytesRead, readTime, userReadTime,
@@ -85,4 +85,4 @@ public class VisorIgfsProfiler {
         }
     }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerClearTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerClearTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerClearTask.java
index ba805c1..b8bfe9e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerClearTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerClearTask.java
@@ -32,7 +32,6 @@ import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
 import org.apache.ignite.internal.visor.VisorJob;
 import org.apache.ignite.internal.visor.VisorOneNodeTask;
-import org.apache.ignite.lang.IgniteBiTuple;
 
 import static org.apache.ignite.internal.visor.util.VisorTaskUtils.resolveIgfsProfilerLogsDir;
 
@@ -40,14 +39,14 @@ import static org.apache.ignite.internal.visor.util.VisorTaskUtils.resolveIgfsPr
  * Remove all IGFS profiler logs.
  */
 @GridInternal
-public class VisorIgfsProfilerClearTask extends VisorOneNodeTask<String, IgniteBiTuple<Integer, Integer>> {
+public class VisorIgfsProfilerClearTask extends VisorOneNodeTask<String, VisorIgfsProfilerClearTaskResult> {
     /** */
     private static final long serialVersionUID = 0L;
 
     /**
      * Job to clear profiler logs.
      */
-    private static class VisorIgfsProfilerClearJob extends VisorJob<String, IgniteBiTuple<Integer, Integer>> {
+    private static class VisorIgfsProfilerClearJob extends VisorJob<String, VisorIgfsProfilerClearTaskResult> {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -62,7 +61,7 @@ public class VisorIgfsProfilerClearTask extends VisorOneNodeTask<String, IgniteB
         }
 
         /** {@inheritDoc} */
-        @Override protected IgniteBiTuple<Integer, Integer> run(String arg) {
+        @Override protected VisorIgfsProfilerClearTaskResult run(String arg) {
             int deleted = 0;
             int notDeleted = 0;
 
@@ -106,7 +105,7 @@ public class VisorIgfsProfilerClearTask extends VisorOneNodeTask<String, IgniteB
                 throw U.convertException(e);
             }
 
-            return new IgniteBiTuple<>(deleted, notDeleted);
+            return new VisorIgfsProfilerClearTaskResult(deleted, notDeleted);
         }
 
         /** {@inheritDoc} */
@@ -119,4 +118,4 @@ public class VisorIgfsProfilerClearTask extends VisorOneNodeTask<String, IgniteB
     @Override protected VisorIgfsProfilerClearJob job(String arg) {
         return new VisorIgfsProfilerClearJob(arg, debug);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerClearTaskResult.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerClearTaskResult.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerClearTaskResult.java
new file mode 100644
index 0000000..2320228
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerClearTaskResult.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.visor.igfs;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
+
+/**
+ * Result for {@link VisorIgfsProfilerClearTask}.
+ */
+public class VisorIgfsProfilerClearTaskResult extends VisorDataTransferObject {
+    /** */
+    private static final long serialVersionUID = 0L;
+
+    /** Count of deleted files. */
+    private Integer deleted;
+
+    /** Count of not deleted files. */
+    private Integer notDeleted;
+
+    /**
+     * Default constructor.
+     */
+    public VisorIgfsProfilerClearTaskResult() {
+        // No-op.
+    }
+
+    /**
+     * @param deleted Count of deleted files.
+     * @param notDeleted Count of not deleted files.
+     */
+    public VisorIgfsProfilerClearTaskResult(Integer deleted, Integer notDeleted) {
+        this.deleted = deleted;
+        this.notDeleted = notDeleted;
+    }
+
+    /**
+     * @return Count of deleted files.
+     */
+    public Integer getDeleted() {
+        return deleted;
+    }
+
+    /**
+     * @return Count of not deleted files.
+     */
+    public Integer getNotDeleted() {
+        return notDeleted;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        out.writeInt(deleted);
+        out.writeInt(notDeleted);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        deleted = in.readInt();
+        notDeleted = in.readInt();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorIgfsProfilerClearTaskResult.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java
index b157296..e7ce1a3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerEntry.java
@@ -17,16 +17,19 @@
 
 package org.apache.ignite.internal.visor.igfs;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.util.Comparator;
 import org.apache.ignite.igfs.IgfsMode;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 /**
  * Visor IGFS profiler information about one file.
  */
-public class VisorIgfsProfilerEntry implements Serializable, LessNamingBean {
+public class VisorIgfsProfilerEntry extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -39,46 +42,53 @@ public class VisorIgfsProfilerEntry implements Serializable, LessNamingBean {
         };
 
     /** Path to file. */
-    private final String path;
+    private String path;
 
     /** Timestamp of last file operation. */
-    private final long ts;
+    private long ts;
 
     /** IGFS mode. */
-    private final IgfsMode mode;
+    private IgfsMode mode;
 
     /** File size. */
-    private final long size;
+    private long size;
 
     /** How many bytes were read. */
-    private final long bytesRead;
+    private long bytesRead;
 
     /** How long read take. */
-    private final long readTime;
+    private long readTime;
 
     /** User read time. */
-    private final long userReadTime;
+    private long userReadTime;
 
     /** How many bytes were written. */
-    private final long bytesWritten;
+    private long bytesWritten;
 
     /** How long write take. */
-    private final long writeTime;
+    private long writeTime;
 
     /** User write read time. */
-    private final long userWriteTime;
+    private long userWriteTime;
 
     /** Calculated uniformity. */
     private double uniformity = -1;
 
     /** Counters for uniformity calculation. */
-    private final VisorIgfsProfilerUniformityCounters counters;
+    private VisorIgfsProfilerUniformityCounters counters;
 
     /** Read speed in bytes per second or {@code -1} if speed not available. */
-    private final long readSpeed;
+    private long readSpeed;
 
     /** Write speed in bytes per second or {@code -1} if speed not available. */
-    private final long writeSpeed;
+    private long writeSpeed;
+
+    /**
+     * Default constructor.
+     */
+    public VisorIgfsProfilerEntry() {
+        // No-op.
+    }
 
     /** Create data transfer object with given parameters. */
     public VisorIgfsProfilerEntry(
@@ -133,77 +143,77 @@ public class VisorIgfsProfilerEntry implements Serializable, LessNamingBean {
     /**
      * @return Path to file.
      */
-    public String path() {
+    public String getPath() {
         return path;
     }
 
     /**
      * @return Timestamp of last file operation.
      */
-    public long timestamp() {
+    public long getTimestamp() {
         return ts;
     }
 
     /**
      * @return IGFS mode.
      */
-    public IgfsMode mode() {
+    public IgfsMode getMode() {
         return mode;
     }
 
     /**
      * @return File size.
      */
-    public long size() {
+    public long getSize() {
         return size;
     }
 
     /**
      * @return How many bytes were read.
      */
-    public long bytesRead() {
+    public long getBytesRead() {
         return bytesRead;
     }
 
     /**
      * @return How long read take.
      */
-    public long readTime() {
+    public long getReadTime() {
         return readTime;
     }
 
     /**
      * @return User read time.
      */
-    public long userReadTime() {
+    public long getUserReadTime() {
         return userReadTime;
     }
 
     /**
      * @return How many bytes were written.
      */
-    public long bytesWritten() {
+    public long getBytesWritten() {
         return bytesWritten;
     }
 
     /**
      * @return How long write take.
      */
-    public long writeTime() {
+    public long getWriteTime() {
         return writeTime;
     }
 
     /**
      * @return User write read time.
      */
-    public long userWriteTime() {
+    public long getUserWriteTime() {
         return userWriteTime;
     }
 
     /**
      * @return Calculated uniformity.
      */
-    public double uniformity() {
+    public double getUniformity() {
         if (uniformity < 0)
             uniformity = counters.calc();
 
@@ -213,25 +223,61 @@ public class VisorIgfsProfilerEntry implements Serializable, LessNamingBean {
     /**
      * @return Counters for uniformity calculation.
      */
-    public VisorIgfsProfilerUniformityCounters counters() {
+    public VisorIgfsProfilerUniformityCounters getCounters() {
         return counters;
     }
 
     /**
      * @return Read speed in bytes per second or {@code -1} if speed not available.
      */
-    public long readSpeed() {
+    public long getReadSpeed() {
         return readSpeed;
     }
 
     /**
      * @return Write speed in bytes per second or {@code -1} if speed not available.
      */
-    public long writeSpeed() {
+    public long getWriteSpeed() {
         return writeSpeed;
     }
 
     /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        U.writeString(out, path);
+        out.writeLong(ts);
+        U.writeEnum(out, mode);
+        out.writeLong(size);
+        out.writeLong(bytesRead);
+        out.writeLong(readTime);
+        out.writeLong(userReadTime);
+        out.writeLong(bytesWritten);
+        out.writeLong(writeTime);
+        out.writeLong(userWriteTime);
+        out.writeDouble(uniformity);
+        out.writeObject(counters);
+        out.writeLong(readSpeed);
+        out.writeLong(writeSpeed);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        path = U.readString(in);
+        ts = in.readLong();
+        mode = IgfsMode.fromOrdinal(in.readByte());
+        size = in.readLong();
+        bytesRead = in.readLong();
+        readTime = in.readLong();
+        userReadTime = in.readLong();
+        bytesWritten = in.readLong();
+        writeTime = in.readLong();
+        userWriteTime = in.readLong();
+        uniformity = in.readDouble();
+        counters = (VisorIgfsProfilerUniformityCounters)in.readObject();
+        readSpeed = in.readLong();
+        writeSpeed = in.readLong();
+    }
+
+    /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorIgfsProfilerEntry.class, this);
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java
index d57d7f9..bd17733 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerTask.java
@@ -203,8 +203,8 @@ public class VisorIgfsProfilerTask extends VisorOneNodeTask<String, Collection<V
 
                 if (logsDir != null)
                     return parse(logsDir, arg);
-                else
-                    return Collections.emptyList();
+
+                return Collections.emptyList();
             }
             catch (IOException | IllegalArgumentException e) {
                 throw new IgniteException("Failed to parse profiler logs for IGFS: " + arg, e);
@@ -481,12 +481,12 @@ public class VisorIgfsProfilerTask extends VisorOneNodeTask<String, Collection<V
             Map<String, List<VisorIgfsProfilerEntry>> byPath = new HashMap<>();
 
             for (VisorIgfsProfilerEntry entry : entries) {
-                List<VisorIgfsProfilerEntry> grp = byPath.get(entry.path());
+                List<VisorIgfsProfilerEntry> grp = byPath.get(entry.getPath());
 
                 if (grp == null) {
                     grp = new ArrayList<>();
 
-                    byPath.put(entry.path(), grp);
+                    byPath.put(entry.getPath(), grp);
                 }
 
                 grp.add(entry);
@@ -541,4 +541,4 @@ public class VisorIgfsProfilerTask extends VisorOneNodeTask<String, Collection<V
     @Override protected VisorIgfsProfilerJob job(String arg) {
         return new VisorIgfsProfilerJob(arg, debug);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerUniformityCounters.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerUniformityCounters.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerUniformityCounters.java
index 9184ce3..8ab4f1f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerUniformityCounters.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsProfilerUniformityCounters.java
@@ -17,10 +17,14 @@
 
 package org.apache.ignite.internal.visor.igfs;
 
-import java.io.Serializable;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
 import java.util.ArrayList;
-import org.apache.ignite.internal.LessNamingBean;
 import org.apache.ignite.internal.util.typedef.F;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.internal.visor.VisorDataTransferObject;
 
 import static org.apache.ignite.internal.visor.igfs.VisorIgfsProfiler.UNIFORMITY_BLOCKS;
 import static org.apache.ignite.internal.visor.igfs.VisorIgfsProfiler.UNIFORMITY_DFLT_BLOCK_SIZE;
@@ -32,7 +36,7 @@ import static org.apache.ignite.internal.visor.igfs.VisorIgfsProfiler.UNIFORMITY
  * </p>
  * Count read frequency for each file and compare with ideal uniform distribution.
  */
-public class VisorIgfsProfilerUniformityCounters implements Serializable, LessNamingBean {
+public class VisorIgfsProfilerUniformityCounters extends VisorDataTransferObject {
     /** */
     private static final long serialVersionUID = 0L;
 
@@ -43,7 +47,14 @@ public class VisorIgfsProfilerUniformityCounters implements Serializable, LessNa
     private long blockSize = UNIFORMITY_DFLT_BLOCK_SIZE;
 
     /** Collection of calculated counters. */
-    private final ArrayList<Integer> counters = new ArrayList<>();
+    private ArrayList<Integer> counters = new ArrayList<>();
+
+    /**
+     * Default constructor.
+     */
+    public VisorIgfsProfilerUniformityCounters() {
+        // No-op.
+    }
 
     /**
      * Calculate block size.
@@ -199,4 +210,23 @@ public class VisorIgfsProfilerUniformityCounters implements Serializable, LessNa
             return 1.0 - sigma;
         }
     }
+
+    /** {@inheritDoc} */
+    @Override protected void writeExternalData(ObjectOutput out) throws IOException {
+        out.writeLong(fileSize);
+        out.writeLong(blockSize);
+        U.writeCollection(out, counters);
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void readExternalData(ObjectInput in) throws IOException, ClassNotFoundException {
+        fileSize = in.readLong();
+        blockSize = in.readLong();
+        counters = (ArrayList<Integer>)U.readIntList(in);
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(VisorIgfsProfilerUniformityCounters.class, this);
+    }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fb9112e6/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java
index 62d93d4..68a11e7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsSamplingStateTask.java
@@ -31,14 +31,14 @@ import org.apache.ignite.lang.IgniteBiTuple;
  * Task to set IGFS instance sampling state.
  */
 @GridInternal
-public class VisorIgfsSamplingStateTask extends VisorOneNodeTask<IgniteBiTuple<String, Boolean>, Void> {
+public class VisorIgfsSamplingStateTask extends VisorOneNodeTask<VisorIgfsSamplingStateTaskArg, Void> {
     /** */
     private static final long serialVersionUID = 0L;
 
     /**
      * Job that perform parsing of IGFS profiler logs.
      */
-    private static class VisorIgfsSamplingStateJob extends VisorJob<IgniteBiTuple<String, Boolean>, Void> {
+    private static class VisorIgfsSamplingStateJob extends VisorJob<VisorIgfsSamplingStateTaskArg, Void> {
         /** */
         private static final long serialVersionUID = 0L;
 
@@ -48,19 +48,19 @@ public class VisorIgfsSamplingStateTask extends VisorOneNodeTask<IgniteBiTuple<S
          * @param arg Job argument.
          * @param debug Debug flag.
          */
-        private VisorIgfsSamplingStateJob(IgniteBiTuple<String, Boolean> arg, boolean debug) {
+        private VisorIgfsSamplingStateJob(VisorIgfsSamplingStateTaskArg arg, boolean debug) {
             super(arg, debug);
         }
 
         /** {@inheritDoc} */
-        @Override protected Void run(IgniteBiTuple<String, Boolean> arg) {
+        @Override protected Void run(VisorIgfsSamplingStateTaskArg arg) {
             try {
-                ((IgfsEx)ignite.fileSystem(arg.get1())).globalSampling(arg.get2());
+                ((IgfsEx)ignite.fileSystem(arg.getName())).globalSampling(arg.isEnabled());
 
                 return null;
             }
             catch (IllegalArgumentException iae) {
-                throw new IgniteException("Failed to set sampling state for IGFS: " + arg.get1(), iae);
+                throw new IgniteException("Failed to set sampling state for IGFS: " + arg.getName(), iae);
             }
             catch (IgniteCheckedException e) {
                 throw U.convertException(e);
@@ -74,7 +74,7 @@ public class VisorIgfsSamplingStateTask extends VisorOneNodeTask<IgniteBiTuple<S
     }
 
     /** {@inheritDoc} */
-    @Override protected VisorIgfsSamplingStateJob job(IgniteBiTuple<String, Boolean> arg) {
+    @Override protected VisorIgfsSamplingStateJob job(VisorIgfsSamplingStateTaskArg arg) {
         return new VisorIgfsSamplingStateJob(arg, debug);
     }
-}
\ No newline at end of file
+}


Mime
View raw message