You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2014/12/05 15:07:34 UTC

[33/52] [abbrv] incubator-ignite git commit: # Renaming

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ef8f69b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryMetricsHelper.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryMetricsHelper.java b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryMetricsHelper.java
deleted file mode 100644
index 295ec98..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryMetricsHelper.java
+++ /dev/null
@@ -1,360 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.discovery;
-
-import org.apache.ignite.cluster.*;
-import org.gridgain.grid.util.typedef.internal.*;
-
-/**
- * Helper class to serialize and deserialize node metrics.
- */
-public final class DiscoveryMetricsHelper {
-    /** Size of serialized node metrics. */
-    public static final int METRICS_SIZE =
-        4/*max active jobs*/ +
-        4/*current active jobs*/ +
-        4/*average active jobs*/ +
-        4/*max waiting jobs*/ +
-        4/*current waiting jobs*/ +
-        4/*average waiting jobs*/ +
-        4/*max cancelled jobs*/ +
-        4/*current cancelled jobs*/ +
-        4/*average cancelled jobs*/ +
-        4/*max rejected jobs*/ +
-        4/*current rejected jobs*/ +
-        4/*average rejected jobs*/ +
-        4/*total executed jobs*/ +
-        4/*total rejected jobs*/ +
-        4/*total cancelled jobs*/ +
-        8/*max job wait time*/ +
-        8/*current job wait time*/ +
-        8/*average job wait time*/ +
-        8/*max job execute time*/ +
-        8/*current job execute time*/ +
-        8/*average job execute time*/ +
-        4/*total executed tasks*/ +
-        8/*current idle time*/ +
-        8/*total idle time*/ +
-        4/*available processors*/ +
-        8/*current CPU load*/ +
-        8/*average CPU load*/ +
-        8/*current GC CPU load*/ +
-        8/*heap memory init*/ +
-        8/*heap memory used*/ +
-        8/*heap memory committed*/ +
-        8/*heap memory max*/ +
-        8/*non-heap memory init*/ +
-        8/*non-heap memory used*/ +
-        8/*non-heap memory committed*/ +
-        8/*non-heap memory max*/ +
-        8/*uptime*/ +
-        8/*start time*/ +
-        8/*node start time*/ +
-        4/*thread count*/ +
-        4/*peak thread count*/ +
-        8/*total started thread count*/ +
-        4/*daemon thread count*/ +
-        8/*last data version.*/ +
-        4/*sent messages count*/ +
-        8/*sent bytes count*/ +
-        4/*received messages count*/ +
-        8/*received bytes count*/ +
-        4/*outbound messages queue size*/;
-
-    /**
-     * Enforces singleton.
-     */
-    private DiscoveryMetricsHelper() {
-        // No-op.
-    }
-
-    /**
-     * Serializes node metrics into byte array.
-     *
-     * @param data Byte array.
-     * @param off Offset into byte array.
-     * @param metrics Node metrics to serialize.
-     * @return New offset.
-     */
-    public static int serialize(byte[] data, int off, ClusterNodeMetrics metrics) {
-        int start = off;
-
-        off = U.intToBytes(metrics.getMaximumActiveJobs(), data, off);
-        off = U.intToBytes(metrics.getCurrentActiveJobs(), data, off);
-        off = U.floatToBytes(metrics.getAverageActiveJobs(), data, off);
-        off = U.intToBytes(metrics.getMaximumWaitingJobs(), data, off);
-        off = U.intToBytes(metrics.getCurrentWaitingJobs(), data, off);
-        off = U.floatToBytes(metrics.getAverageWaitingJobs(), data, off);
-        off = U.intToBytes(metrics.getMaximumRejectedJobs(), data, off);
-        off = U.intToBytes(metrics.getCurrentRejectedJobs(), data, off);
-        off = U.floatToBytes(metrics.getAverageRejectedJobs(), data, off);
-        off = U.intToBytes(metrics.getMaximumCancelledJobs(), data, off);
-        off = U.intToBytes(metrics.getCurrentCancelledJobs(), data, off);
-        off = U.floatToBytes(metrics.getAverageCancelledJobs(), data, off);
-        off = U.intToBytes(metrics.getTotalRejectedJobs(), data , off);
-        off = U.intToBytes(metrics.getTotalCancelledJobs(), data , off);
-        off = U.intToBytes(metrics.getTotalExecutedJobs(), data , off);
-        off = U.longToBytes(metrics.getMaximumJobWaitTime(), data, off);
-        off = U.longToBytes(metrics.getCurrentJobWaitTime(), data, off);
-        off = U.doubleToBytes(metrics.getAverageJobWaitTime(), data, off);
-        off = U.longToBytes(metrics.getMaximumJobExecuteTime(), data, off);
-        off = U.longToBytes(metrics.getCurrentJobExecuteTime(), data, off);
-        off = U.doubleToBytes(metrics.getAverageJobExecuteTime(), data, off);
-        off = U.intToBytes(metrics.getTotalExecutedTasks(), data, off);
-        off = U.longToBytes(metrics.getCurrentIdleTime(), data, off);
-        off = U.longToBytes(metrics.getTotalIdleTime(), data , off);
-        off = U.intToBytes(metrics.getTotalCpus(), data, off);
-        off = U.doubleToBytes(metrics.getCurrentCpuLoad(), data, off);
-        off = U.doubleToBytes(metrics.getAverageCpuLoad(), data, off);
-        off = U.doubleToBytes(metrics.getCurrentGcCpuLoad(), data, off);
-        off = U.longToBytes(metrics.getHeapMemoryInitialized(), data, off);
-        off = U.longToBytes(metrics.getHeapMemoryUsed(), data, off);
-        off = U.longToBytes(metrics.getHeapMemoryCommitted(), data, off);
-        off = U.longToBytes(metrics.getHeapMemoryMaximum(), data, off);
-        off = U.longToBytes(metrics.getNonHeapMemoryInitialized(), data, off);
-        off = U.longToBytes(metrics.getNonHeapMemoryUsed(), data, off);
-        off = U.longToBytes(metrics.getNonHeapMemoryCommitted(), data, off);
-        off = U.longToBytes(metrics.getNonHeapMemoryMaximum(), data, off);
-        off = U.longToBytes(metrics.getStartTime(), data, off);
-        off = U.longToBytes(metrics.getNodeStartTime(), data, off);
-        off = U.longToBytes(metrics.getUpTime(), data, off);
-        off = U.intToBytes(metrics.getCurrentThreadCount(), data, off);
-        off = U.intToBytes(metrics.getMaximumThreadCount(), data, off);
-        off = U.longToBytes(metrics.getTotalStartedThreadCount(), data, off);
-        off = U.intToBytes(metrics.getCurrentDaemonThreadCount(), data, off);
-        off = U.longToBytes(metrics.getLastDataVersion(), data, off);
-        off = U.intToBytes(metrics.getSentMessagesCount(), data, off);
-        off = U.longToBytes(metrics.getSentBytesCount(), data, off);
-        off = U.intToBytes(metrics.getReceivedMessagesCount(), data, off);
-        off = U.longToBytes(metrics.getReceivedBytesCount(), data, off);
-        off = U.intToBytes(metrics.getOutboundMessagesQueueSize(), data, off);
-
-        assert off - start == METRICS_SIZE : "Invalid metrics size [expected=" + METRICS_SIZE + ", actual=" +
-            (off - start) + ']';
-
-        return off;
-    }
-
-    /**
-     * De-serializes node metrics.
-     *
-     * @param data Byte array.
-     * @param off Offset into byte array.
-     * @return Deserialized node metrics.
-     */
-    public static ClusterNodeMetrics deserialize(byte[] data, int off) {
-        int start = off;
-
-        DiscoveryNodeMetricsAdapter metrics = new DiscoveryNodeMetricsAdapter();
-
-        metrics.setLastUpdateTime(U.currentTimeMillis());
-
-        metrics.setMaximumActiveJobs(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setCurrentActiveJobs(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setAverageActiveJobs(U.bytesToFloat(data, off));
-
-        off += 4;
-
-        metrics.setMaximumWaitingJobs(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setCurrentWaitingJobs(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setAverageWaitingJobs(U.bytesToFloat(data, off));
-
-        off += 4;
-
-        metrics.setMaximumRejectedJobs(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setCurrentRejectedJobs(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setAverageRejectedJobs(U.bytesToFloat(data, off));
-
-        off += 4;
-
-        metrics.setMaximumCancelledJobs(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setCurrentCancelledJobs(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setAverageCancelledJobs(U.bytesToFloat(data, off));
-
-        off += 4;
-
-        metrics.setTotalRejectedJobs(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setTotalCancelledJobs(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setTotalExecutedJobs(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setMaximumJobWaitTime(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setCurrentJobWaitTime(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setAverageJobWaitTime(U.bytesToDouble(data, off));
-
-        off += 8;
-
-        metrics.setMaximumJobExecuteTime(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setCurrentJobExecuteTime(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setAverageJobExecuteTime(U.bytesToDouble(data, off));
-
-        off += 8;
-
-        metrics.setTotalExecutedTasks(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setCurrentIdleTime(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setTotalIdleTime(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setAvailableProcessors(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setCurrentCpuLoad(U.bytesToDouble(data, off));
-
-        off += 8;
-
-        metrics.setAverageCpuLoad(U.bytesToDouble(data, off));
-
-        off += 8;
-
-        metrics.setCurrentGcCpuLoad(U.bytesToDouble(data, off));
-
-        off += 8;
-
-        metrics.setHeapMemoryInitialized(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setHeapMemoryUsed(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setHeapMemoryCommitted(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setHeapMemoryMaximum(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setNonHeapMemoryInitialized(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setNonHeapMemoryUsed(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setNonHeapMemoryCommitted(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setNonHeapMemoryMaximum(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setStartTime(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setNodeStartTime(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setUpTime(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setCurrentThreadCount(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setMaximumThreadCount(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setTotalStartedThreadCount(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setCurrentDaemonThreadCount(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setLastDataVersion(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setSentMessagesCount(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setSentBytesCount(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setReceivedMessagesCount(U.bytesToInt(data, off));
-
-        off += 4;
-
-        metrics.setReceivedBytesCount(U.bytesToLong(data, off));
-
-        off += 8;
-
-        metrics.setOutboundMessagesQueueSize(U.bytesToInt(data, off));
-
-        off += 4;
-
-        assert off - start == METRICS_SIZE : "Invalid metrics size [expected=" + METRICS_SIZE + ", actual=" +
-            (off - start) + ']';
-
-        return metrics;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ef8f69b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryMetricsProvider.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryMetricsProvider.java b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryMetricsProvider.java
deleted file mode 100644
index cdeac94..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryMetricsProvider.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.discovery;
-
-import org.apache.ignite.cluster.*;
-import org.gridgain.grid.util.tostring.*;
-
-/**
- * Provides metrics to discovery SPI. It is responsibility of discovery SPI
- * to make sure that all nodes have updated metrics data about each other.
- * <p>
- * GridGain implementation will supply discovery SPI with metrics provider
- * via {@link DiscoverySpi#setMetricsProvider(DiscoveryMetricsProvider)}
- * method.
- */
-@GridToStringExclude
-public interface DiscoveryMetricsProvider {
-    /**
-     * This method always returns up-to-date metrics data about local node.
-     *
-     * @return Up to date metrics data about local node.
-     */
-    public ClusterNodeMetrics getMetrics();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ef8f69b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryNodeMetricsAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryNodeMetricsAdapter.java b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryNodeMetricsAdapter.java
deleted file mode 100644
index c2d40de..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoveryNodeMetricsAdapter.java
+++ /dev/null
@@ -1,1060 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.discovery;
-
-import org.apache.ignite.cluster.*;
-import org.gridgain.grid.kernal.managers.discovery.*;
-import org.gridgain.grid.util.typedef.internal.*;
-
-import java.io.*;
-
-/**
- * Adapter for {@link GridLocalMetrics} interface.
- * <p>
- * Note that whenever adding or removing metric parameters, care
- * must be taken to update {@link DiscoveryMetricsHelper} as well.
- */
-public class DiscoveryNodeMetricsAdapter implements ClusterNodeMetrics, Externalizable {
-    /** */
-    private static final long serialVersionUID = 0L;
-
-    /** */
-    private long lastUpdateTime = -1;
-
-    /** */
-    private int maxActiveJobs = -1;
-
-    /** */
-    private int curActiveJobs = -1;
-
-    /** */
-    private float avgActiveJobs = -1;
-
-    /** */
-    private int maxWaitingJobs = -1;
-
-    /** */
-    private int curWaitingJobs = -1;
-
-    /** */
-    private float avgWaitingJobs = -1;
-
-    /** */
-    private int maxRejectedJobs = -1;
-
-    /** */
-    private int curRejectedJobs = -1;
-
-    /** */
-    private float avgRejectedJobs = -1;
-
-    /** */
-    private int maxCancelledJobs = -1;
-
-    /** */
-    private int curCancelledJobs = -1;
-
-    /** */
-    private float avgCancelledJobs = -1;
-
-    /** */
-    private int totalRejectedJobs = -1;
-
-    /** */
-    private int totalCancelledJobs = -1;
-
-    /** */
-    private int totalExecutedJobs = -1;
-
-    /** */
-    private long maxJobWaitTime = -1;
-
-    /** */
-    private long curJobWaitTime = -1;
-
-    /** */
-    private double avgJobWaitTime = -1;
-
-    /** */
-    private long maxJobExecTime = -1;
-
-    /** */
-    private long curJobExecTime = -1;
-
-    /** */
-    private double avgJobExecTime = -1;
-
-    /** */
-    private int totalExecTasks = -1;
-
-    /** */
-    private long totalIdleTime = -1;
-
-    /** */
-    private long curIdleTime = -1;
-
-    /** */
-    private int availProcs = -1;
-
-    /** */
-    private long totalPhysicalMemory = -1;
-
-    /** */
-    private double load = -1;
-
-    /** */
-    private double avgLoad = -1;
-
-    /** */
-    private double gcLoad = -1;
-
-    /** */
-    private long heapInit = -1;
-
-    /** */
-    private long heapUsed = -1;
-
-    /** */
-    private long heapCommitted = -1;
-
-    /** */
-    private long heapMax = -1;
-
-    /** */
-    private long nonHeapInit = -1;
-
-    /** */
-    private long nonHeapUsed = -1;
-
-    /** */
-    private long nonHeapCommitted = -1;
-
-    /** */
-    private long nonHeapMax = -1;
-
-    /** */
-    private long upTime = -1;
-
-    /** */
-    private long startTime = -1;
-
-    /** */
-    private long nodeStartTime = -1;
-
-    /** */
-    private int threadCnt = -1;
-
-    /** */
-    private int peakThreadCnt = -1;
-
-    /** */
-    private long startedThreadCnt = -1;
-
-    /** */
-    private int daemonThreadCnt = -1;
-
-    /** */
-    private long lastDataVer = -1;
-
-    /** */
-    private int sentMsgsCnt = -1;
-
-    /** */
-    private long sentBytesCnt = -1;
-
-    /** */
-    private int rcvdMsgsCnt = -1;
-
-    /** */
-    private long rcvdBytesCnt = -1;
-
-    /** */
-    private int outMesQueueSize = -1;
-
-    /** {@inheritDoc} */
-    @Override public long getLastUpdateTime() {
-        return lastUpdateTime;
-    }
-
-    /**
-     * Sets last update time.
-     *
-     * @param lastUpdateTime Last update time.
-     */
-    public void setLastUpdateTime(long lastUpdateTime) {
-        this.lastUpdateTime = lastUpdateTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getMaximumActiveJobs() {
-        return maxActiveJobs;
-    }
-
-    /**
-     * Sets max active jobs.
-     *
-     * @param maxActiveJobs Max active jobs.
-     */
-    public void setMaximumActiveJobs(int maxActiveJobs) {
-        this.maxActiveJobs = maxActiveJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getCurrentActiveJobs() {
-        return curActiveJobs;
-    }
-
-    /**
-     * Sets current active jobs.
-     *
-     * @param curActiveJobs Current active jobs.
-     */
-    public void setCurrentActiveJobs(int curActiveJobs) {
-        this.curActiveJobs = curActiveJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public float getAverageActiveJobs() {
-        return avgActiveJobs;
-    }
-
-    /**
-     * Sets average active jobs.
-     *
-     * @param avgActiveJobs Average active jobs.
-     */
-    public void setAverageActiveJobs(float avgActiveJobs) {
-        this.avgActiveJobs = avgActiveJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getMaximumWaitingJobs() {
-        return maxWaitingJobs;
-    }
-
-    /**
-     * Sets maximum waiting jobs.
-     *
-     * @param maxWaitingJobs Maximum waiting jobs.
-     */
-    public void setMaximumWaitingJobs(int maxWaitingJobs) {
-        this.maxWaitingJobs = maxWaitingJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getCurrentWaitingJobs() {
-        return curWaitingJobs;
-    }
-
-    /**
-     * Sets current waiting jobs.
-     *
-     * @param curWaitingJobs Current waiting jobs.
-     */
-    public void setCurrentWaitingJobs(int curWaitingJobs) {
-        this.curWaitingJobs = curWaitingJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public float getAverageWaitingJobs() {
-        return avgWaitingJobs;
-    }
-
-    /**
-     * Sets average waiting jobs.
-     *
-     * @param avgWaitingJobs Average waiting jobs.
-     */
-    public void setAverageWaitingJobs(float avgWaitingJobs) {
-        this.avgWaitingJobs = avgWaitingJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getMaximumRejectedJobs() {
-        return maxRejectedJobs;
-    }
-
-    /**
-     * @param maxRejectedJobs Maximum number of jobs rejected during a single collision resolution event.
-     */
-    public void setMaximumRejectedJobs(int maxRejectedJobs) {
-        this.maxRejectedJobs = maxRejectedJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getCurrentRejectedJobs() {
-        return curRejectedJobs;
-    }
-
-    /**
-     * @param curRejectedJobs Number of jobs rejected during most recent collision resolution.
-     */
-    public void setCurrentRejectedJobs(int curRejectedJobs) {
-        this.curRejectedJobs = curRejectedJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public float getAverageRejectedJobs() {
-        return avgRejectedJobs;
-    }
-
-    /**
-     * @param avgRejectedJobs Average number of jobs this node rejects.
-     */
-    public void setAverageRejectedJobs(float avgRejectedJobs) {
-        this.avgRejectedJobs = avgRejectedJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getTotalRejectedJobs() {
-        return totalRejectedJobs;
-    }
-
-    /**
-     * @param totalRejectedJobs Total number of jobs this node ever rejected.
-     */
-    public void setTotalRejectedJobs(int totalRejectedJobs) {
-        this.totalRejectedJobs = totalRejectedJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getMaximumCancelledJobs() {
-        return maxCancelledJobs;
-    }
-
-    /**
-     * Sets maximum cancelled jobs.
-     *
-     * @param maxCancelledJobs Maximum cancelled jobs.
-     */
-    public void setMaximumCancelledJobs(int maxCancelledJobs) {
-        this.maxCancelledJobs = maxCancelledJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getCurrentCancelledJobs() {
-        return curCancelledJobs;
-    }
-
-    /**
-     * Sets current cancelled jobs.
-     *
-     * @param curCancelledJobs Current cancelled jobs.
-     */
-    public void setCurrentCancelledJobs(int curCancelledJobs) {
-        this.curCancelledJobs = curCancelledJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public float getAverageCancelledJobs() {
-        return avgCancelledJobs;
-    }
-
-    /**
-     * Sets average cancelled jobs.
-     *
-     * @param avgCancelledJobs Average cancelled jobs.
-     */
-    public void setAverageCancelledJobs(float avgCancelledJobs) {
-        this.avgCancelledJobs = avgCancelledJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getTotalExecutedJobs() {
-        return totalExecutedJobs;
-    }
-
-    /**
-     * Sets total active jobs.
-     *
-     * @param totalExecutedJobs Total active jobs.
-     */
-    public void setTotalExecutedJobs(int totalExecutedJobs) {
-        this.totalExecutedJobs = totalExecutedJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getTotalCancelledJobs() {
-        return totalCancelledJobs;
-    }
-
-    /**
-     * Sets total cancelled jobs.
-     *
-     * @param totalCancelledJobs Total cancelled jobs.
-     */
-    public void setTotalCancelledJobs(int totalCancelledJobs) {
-        this.totalCancelledJobs = totalCancelledJobs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getMaximumJobWaitTime() {
-        return maxJobWaitTime;
-    }
-
-    /**
-     * Sets max job wait time.
-     *
-     * @param maxJobWaitTime Max job wait time.
-     */
-    public void setMaximumJobWaitTime(long maxJobWaitTime) {
-        this.maxJobWaitTime = maxJobWaitTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getCurrentJobWaitTime() {
-        return curJobWaitTime;
-    }
-
-    /**
-     * Sets current job wait time.
-     *
-     * @param curJobWaitTime Current job wait time.
-     */
-    public void setCurrentJobWaitTime(long curJobWaitTime) {
-        this.curJobWaitTime = curJobWaitTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public double getAverageJobWaitTime() {
-        return avgJobWaitTime;
-    }
-
-    /**
-     * Sets average job wait time.
-     *
-     * @param avgJobWaitTime Average job wait time.
-     */
-    public void setAverageJobWaitTime(double avgJobWaitTime) {
-        this.avgJobWaitTime = avgJobWaitTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getMaximumJobExecuteTime() {
-        return maxJobExecTime;
-    }
-
-    /**
-     * Sets maximum job execution time.
-     *
-     * @param maxJobExecTime Maximum job execution time.
-     */
-    public void setMaximumJobExecuteTime(long maxJobExecTime) {
-        this.maxJobExecTime = maxJobExecTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getCurrentJobExecuteTime() {
-        return curJobExecTime;
-    }
-
-    /**
-     * Sets current job execute time.
-     *
-     * @param curJobExecTime Current job execute time.
-     */
-    public void setCurrentJobExecuteTime(long curJobExecTime) {
-        this.curJobExecTime = curJobExecTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public double getAverageJobExecuteTime() {
-        return avgJobExecTime;
-    }
-
-    /**
-     * Sets average job execution time.
-     *
-     * @param avgJobExecTime Average job execution time.
-     */
-    public void setAverageJobExecuteTime(double avgJobExecTime) {
-        this.avgJobExecTime = avgJobExecTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getTotalExecutedTasks() {
-        return totalExecTasks;
-    }
-
-    /**
-     * Sets total executed tasks count.
-     *
-     * @param totalExecTasks total executed tasks count.
-     */
-    public void setTotalExecutedTasks(int totalExecTasks) {
-        this.totalExecTasks = totalExecTasks;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getTotalBusyTime() {
-        return getUpTime() - getTotalIdleTime();
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getTotalIdleTime() {
-        return totalIdleTime;
-    }
-
-    /**
-     * Set total node idle time.
-     *
-     * @param totalIdleTime Total node idle time.
-     */
-    public void setTotalIdleTime(long totalIdleTime) {
-        this.totalIdleTime = totalIdleTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getCurrentIdleTime() {
-        return curIdleTime;
-    }
-
-    /**
-     * Sets time elapsed since execution of last job.
-     *
-     * @param curIdleTime Time elapsed since execution of last job.
-     */
-    public void setCurrentIdleTime(long curIdleTime) {
-        this.curIdleTime = curIdleTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public float getBusyTimePercentage() {
-        return 1 - getIdleTimePercentage();
-    }
-
-    /** {@inheritDoc} */
-    @Override public float getIdleTimePercentage() {
-        return getTotalIdleTime() / (float)getUpTime();
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getTotalCpus() {
-        return availProcs;
-    }
-
-    /** {@inheritDoc} */
-    @Override public double getCurrentCpuLoad() {
-        return load;
-    }
-
-    /** {@inheritDoc} */
-    @Override public double getAverageCpuLoad() {
-        return avgLoad;
-    }
-
-    /** {@inheritDoc} */
-    @Override public double getCurrentGcCpuLoad() {
-        return gcLoad;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getHeapMemoryInitialized() {
-        return heapInit;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getHeapMemoryUsed() {
-        return heapUsed;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getHeapMemoryCommitted() {
-        return heapCommitted;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getHeapMemoryMaximum() {
-        return heapMax;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getNonHeapMemoryInitialized() {
-        return nonHeapInit;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getNonHeapMemoryUsed() {
-        return nonHeapUsed;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getNonHeapMemoryCommitted() {
-        return nonHeapCommitted;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getNonHeapMemoryMaximum() {
-        return nonHeapMax;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getUpTime() {
-        return upTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getStartTime() {
-        return startTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getNodeStartTime() {
-        return nodeStartTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getCurrentThreadCount() {
-        return threadCnt;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getMaximumThreadCount() {
-        return peakThreadCnt;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getTotalStartedThreadCount() {
-        return startedThreadCnt;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getCurrentDaemonThreadCount() {
-        return daemonThreadCnt;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getLastDataVersion() {
-        return lastDataVer;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getSentMessagesCount() {
-        return sentMsgsCnt;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getSentBytesCount() {
-        return sentBytesCnt;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getReceivedMessagesCount() {
-        return rcvdMsgsCnt;
-    }
-
-    /** {@inheritDoc} */
-    @Override public long getReceivedBytesCount() {
-        return rcvdBytesCnt;
-    }
-
-    /** {@inheritDoc} */
-    @Override public int getOutboundMessagesQueueSize() {
-        return outMesQueueSize;
-    }
-
-    /**
-     * Sets available processors.
-     *
-     * @param availProcs Available processors.
-     */
-    public void setAvailableProcessors(int availProcs) {
-        this.availProcs = availProcs;
-    }
-
-    /**
-     * Sets current CPU load.
-     *
-     * @param load Current CPU load.
-     */
-    public void setCurrentCpuLoad(double load) {
-        this.load = load;
-    }
-
-    /**
-     * Sets CPU load average over the metrics history.
-     *
-     * @param avgLoad CPU load average.
-     */
-    public void setAverageCpuLoad(double avgLoad) {
-        this.avgLoad = avgLoad;
-    }
-
-    /**
-     * Sets current GC load.
-     *
-     * @param gcLoad Current GC load.
-     */
-    public void setCurrentGcCpuLoad(double gcLoad) {
-        this.gcLoad = gcLoad;
-    }
-
-    /**
-     * Sets heap initial memory.
-     *
-     * @param heapInit Heap initial memory.
-     */
-    public void setHeapMemoryInitialized(long heapInit) {
-        this.heapInit = heapInit;
-    }
-
-    /**
-     * Sets used heap memory.
-     *
-     * @param heapUsed Used heap memory.
-     */
-    public void setHeapMemoryUsed(long heapUsed) {
-        this.heapUsed = heapUsed;
-    }
-
-    /**
-     * Sets committed heap memory.
-     *
-     * @param heapCommitted Committed heap memory.
-     */
-    public void setHeapMemoryCommitted(long heapCommitted) {
-        this.heapCommitted = heapCommitted;
-    }
-
-    /**
-     * Sets maximum possible heap memory.
-     *
-     * @param heapMax Maximum possible heap memory.
-     */
-    public void setHeapMemoryMaximum(long heapMax) {
-        this.heapMax = heapMax;
-    }
-
-    /**
-     * Sets initial non-heap memory.
-     *
-     * @param nonHeapInit Initial non-heap memory.
-     */
-    public void setNonHeapMemoryInitialized(long nonHeapInit) {
-        this.nonHeapInit = nonHeapInit;
-    }
-
-    /**
-     * Sets used non-heap memory.
-     *
-     * @param nonHeapUsed Used non-heap memory.
-     */
-    public void setNonHeapMemoryUsed(long nonHeapUsed) {
-        this.nonHeapUsed = nonHeapUsed;
-    }
-
-    /**
-     * Sets committed non-heap memory.
-     *
-     * @param nonHeapCommitted Committed non-heap memory.
-     */
-    public void setNonHeapMemoryCommitted(long nonHeapCommitted) {
-        this.nonHeapCommitted = nonHeapCommitted;
-    }
-
-    /**
-     * Sets maximum possible non-heap memory.
-     *
-     * @param nonHeapMax Maximum possible non-heap memory.
-     */
-    public void setNonHeapMemoryMaximum(long nonHeapMax) {
-        this.nonHeapMax = nonHeapMax;
-    }
-
-    /**
-     * Sets VM up time.
-     *
-     * @param upTime VM up time.
-     */
-    public void setUpTime(long upTime) {
-        this.upTime = upTime;
-    }
-
-    /**
-     * Sets VM start time.
-     *
-     * @param startTime VM start time.
-     */
-    public void setStartTime(long startTime) {
-        this.startTime = startTime;
-    }
-
-    /**
-     * Sets node start time.
-     *
-     * @param nodeStartTime node start time.
-     */
-    public void setNodeStartTime(long nodeStartTime) {
-        this.nodeStartTime = nodeStartTime;
-    }
-
-    /**
-     * Sets thread count.
-     *
-     * @param threadCnt Thread count.
-     */
-    public void setCurrentThreadCount(int threadCnt) {
-        this.threadCnt = threadCnt;
-    }
-
-    /**
-     * Sets peak thread count.
-     *
-     * @param peakThreadCnt Peak thread count.
-     */
-    public void setMaximumThreadCount(int peakThreadCnt) {
-        this.peakThreadCnt = peakThreadCnt;
-    }
-
-    /**
-     * Sets started thread count.
-     *
-     * @param startedThreadCnt Started thread count.
-     */
-    public void setTotalStartedThreadCount(long startedThreadCnt) {
-        this.startedThreadCnt = startedThreadCnt;
-    }
-
-    /**
-     * Sets daemon thread count.
-     *
-     * @param daemonThreadCnt Daemon thread count.
-     */
-    public void setCurrentDaemonThreadCount(int daemonThreadCnt) {
-        this.daemonThreadCnt = daemonThreadCnt;
-    }
-
-    /**
-     * Sets last data version.
-     *
-     * @param lastDataVer Last data version.
-     */
-    public void setLastDataVersion(long lastDataVer) {
-        this.lastDataVer = lastDataVer;
-    }
-
-    /**
-     * Sets sent messages count.
-     *
-     * @param sentMsgsCnt Sent messages count.
-     */
-    public void setSentMessagesCount(int sentMsgsCnt) {
-        this.sentMsgsCnt = sentMsgsCnt;
-    }
-
-    /**
-     * Sets sent bytes count.
-     *
-     * @param sentBytesCnt Sent bytes count.
-     */
-    public void setSentBytesCount(long sentBytesCnt) {
-        this.sentBytesCnt = sentBytesCnt;
-    }
-
-    /**
-     * Sets received messages count.
-     *
-     * @param rcvdMsgsCnt Received messages count.
-     */
-    public void setReceivedMessagesCount(int rcvdMsgsCnt) {
-        this.rcvdMsgsCnt = rcvdMsgsCnt;
-    }
-
-    /**
-     * Sets received bytes count.
-     *
-     * @param rcvdBytesCnt Received bytes count.
-     */
-    public void setReceivedBytesCount(long rcvdBytesCnt) {
-        this.rcvdBytesCnt = rcvdBytesCnt;
-    }
-
-    /**
-     * Sets outbound messages queue size.
-     *
-     * @param outMesQueueSize Outbound messages queue size.
-     */
-    public void setOutboundMessagesQueueSize(int outMesQueueSize) {
-        this.outMesQueueSize = outMesQueueSize;
-    }
-
-    /** {@inheritDoc} */
-    @Override public void writeExternal(ObjectOutput out) throws IOException {
-        out.writeInt(maxActiveJobs);
-        out.writeInt(curActiveJobs);
-        out.writeFloat(avgActiveJobs);
-        out.writeInt(maxWaitingJobs);
-        out.writeInt(curWaitingJobs);
-        out.writeFloat(avgWaitingJobs);
-        out.writeInt(maxCancelledJobs);
-        out.writeInt(curCancelledJobs);
-        out.writeFloat(avgCancelledJobs);
-        out.writeInt(maxRejectedJobs);
-        out.writeInt(curRejectedJobs);
-        out.writeFloat(avgRejectedJobs);
-        out.writeInt(totalExecutedJobs);
-        out.writeInt(totalCancelledJobs);
-        out.writeInt(totalRejectedJobs);
-        out.writeLong(maxJobWaitTime);
-        out.writeLong(curJobWaitTime);
-        out.writeDouble(avgJobWaitTime);
-        out.writeLong(maxJobExecTime);
-        out.writeLong(curJobExecTime);
-        out.writeDouble(avgJobExecTime);
-        out.writeInt(totalExecTasks);
-        out.writeLong(curIdleTime);
-        out.writeLong(totalIdleTime);
-        out.writeInt(availProcs);
-        out.writeLong(totalPhysicalMemory);
-        out.writeDouble(load);
-        out.writeDouble(avgLoad);
-        out.writeDouble(gcLoad);
-        out.writeLong(heapInit);
-        out.writeLong(heapUsed);
-        out.writeLong(heapCommitted);
-        out.writeLong(heapMax);
-        out.writeLong(nonHeapInit);
-        out.writeLong(nonHeapUsed);
-        out.writeLong(nonHeapCommitted);
-        out.writeLong(nonHeapMax);
-        out.writeLong(upTime);
-        out.writeLong(startTime);
-        out.writeLong(nodeStartTime);
-        out.writeInt(threadCnt);
-        out.writeInt(peakThreadCnt);
-        out.writeLong(startedThreadCnt);
-        out.writeInt(daemonThreadCnt);
-        out.writeLong(lastDataVer);
-        out.writeInt(sentMsgsCnt);
-        out.writeLong(sentBytesCnt);
-        out.writeInt(rcvdMsgsCnt);
-        out.writeLong(rcvdBytesCnt);
-        out.writeInt(outMesQueueSize);
-    }
-
-    /** {@inheritDoc} */
-    @Override public void readExternal(ObjectInput in) throws IOException {
-        lastUpdateTime = U.currentTimeMillis();
-
-        maxActiveJobs = in.readInt();
-        curActiveJobs = in.readInt();
-        avgActiveJobs = in.readFloat();
-        maxWaitingJobs = in.readInt();
-        curWaitingJobs = in.readInt();
-        avgWaitingJobs = in.readFloat();
-        maxCancelledJobs = in.readInt();
-        curCancelledJobs = in.readInt();
-        avgCancelledJobs = in.readFloat();
-        maxRejectedJobs = in.readInt();
-        curRejectedJobs = in.readInt();
-        avgRejectedJobs = in.readFloat();
-        totalExecutedJobs = in.readInt();
-        totalCancelledJobs = in.readInt();
-        totalRejectedJobs = in.readInt();
-        maxJobWaitTime = in.readLong();
-        curJobWaitTime = in.readLong();
-        avgJobWaitTime = in.readDouble();
-        maxJobExecTime = in.readLong();
-        curJobExecTime = in.readLong();
-        avgJobExecTime = in.readDouble();
-        totalExecTasks = in.readInt();
-        curIdleTime = in.readLong();
-        totalIdleTime = in.readLong();
-        availProcs = in.readInt();
-        totalPhysicalMemory = in.readLong();
-        load = in.readDouble();
-        avgLoad = in.readDouble();
-        gcLoad = in.readDouble();
-        heapInit = in.readLong();
-        heapUsed = in.readLong();
-        heapCommitted = in.readLong();
-        heapMax = in.readLong();
-        nonHeapInit = in.readLong();
-        nonHeapUsed = in.readLong();
-        nonHeapCommitted = in.readLong();
-        nonHeapMax = in.readLong();
-        upTime = in.readLong();
-        startTime = in.readLong();
-        nodeStartTime = in.readLong();
-        threadCnt = in.readInt();
-        peakThreadCnt = in.readInt();
-        startedThreadCnt = in.readLong();
-        daemonThreadCnt = in.readInt();
-        lastDataVer = in.readLong();
-        sentMsgsCnt = in.readInt();
-        sentBytesCnt = in.readLong();
-        rcvdMsgsCnt = in.readInt();
-        rcvdBytesCnt = in.readLong();
-        outMesQueueSize = in.readInt();
-    }
-
-    /** {@inheritDoc} */
-    @Override public int hashCode() {
-        return System.identityHashCode(this);
-    }
-
-    /** {@inheritDoc} */
-    @Override public boolean equals(Object obj) {
-        if (this == obj)
-            return true;
-
-        if (obj == null || getClass() != obj.getClass())
-            return false;
-
-        DiscoveryNodeMetricsAdapter other = (DiscoveryNodeMetricsAdapter)obj;
-
-        return
-            availProcs == other.availProcs &&
-            totalPhysicalMemory == other.totalPhysicalMemory &&
-            curActiveJobs == other.curActiveJobs &&
-            curCancelledJobs == other.curCancelledJobs &&
-            curIdleTime == other.curIdleTime &&
-            curJobExecTime == other.curJobExecTime &&
-            curJobWaitTime == other.curJobWaitTime &&
-            curRejectedJobs == other.curRejectedJobs &&
-            curWaitingJobs == other.curWaitingJobs &&
-            daemonThreadCnt == other.daemonThreadCnt &&
-            heapCommitted == other.heapCommitted &&
-            heapInit == other.heapInit &&
-            heapMax == other.heapMax &&
-            heapUsed == other.heapUsed &&
-            maxActiveJobs == other.maxActiveJobs &&
-            maxCancelledJobs == other.maxCancelledJobs &&
-            maxJobExecTime == other.maxJobExecTime &&
-            maxJobWaitTime == other.maxJobWaitTime &&
-            maxRejectedJobs == other.maxRejectedJobs &&
-            maxWaitingJobs == other.maxWaitingJobs &&
-            nonHeapCommitted == other.nonHeapCommitted &&
-            nonHeapInit == other.nonHeapInit &&
-            nonHeapMax == other.nonHeapMax &&
-            nonHeapUsed == other.nonHeapUsed &&
-            peakThreadCnt == other.peakThreadCnt &&
-            rcvdBytesCnt == other.rcvdBytesCnt &&
-            outMesQueueSize == other.outMesQueueSize &&
-            rcvdMsgsCnt == other.rcvdMsgsCnt &&
-            sentBytesCnt == other.sentBytesCnt &&
-            sentMsgsCnt == other.sentMsgsCnt &&
-            startTime == other.startTime &&
-            nodeStartTime == other.nodeStartTime &&
-            startedThreadCnt == other.startedThreadCnt &&
-            threadCnt == other.threadCnt &&
-            totalCancelledJobs == other.totalCancelledJobs &&
-            totalExecutedJobs == other.totalExecutedJobs &&
-            totalExecTasks == other.totalExecTasks &&
-            totalIdleTime == other.totalIdleTime &&
-            totalRejectedJobs == other.totalRejectedJobs &&
-            upTime == other.upTime;
-    }
-
-    /** {@inheritDoc} */
-    @Override public String toString() {
-        return S.toString(DiscoveryNodeMetricsAdapter.class, this);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ef8f69b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpi.java b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpi.java
deleted file mode 100644
index 0d868b6..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpi.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.discovery;
-
-import org.apache.ignite.cluster.*;
-import org.apache.ignite.product.*;
-import org.apache.ignite.spi.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Grid discovery SPI allows to discover remote nodes in grid.
- * <p>
- * The default discovery SPI is {@link org.gridgain.grid.spi.discovery.tcp.TcpDiscoverySpi}
- * with default configuration which allows all nodes in local network
- * (with enabled multicast) to discover each other.
- * <p>
- * Gridgain provides the following {@code GridDeploymentSpi} implementation:
- * <ul>
- * <li>{@link org.gridgain.grid.spi.discovery.tcp.TcpDiscoverySpi}</li>
- * </ul>
- * <b>NOTE:</b> this SPI (i.e. methods in this interface) should never be used directly. SPIs provide
- * internal view on the subsystem and is used internally by GridGain kernal. In rare use cases when
- * access to a specific implementation of this SPI is required - an instance of this SPI can be obtained
- * via {@link org.apache.ignite.Ignite#configuration()} method to check its configuration properties or call other non-SPI
- * methods. Note again that calling methods from this interface on the obtained instance can lead
- * to undefined behavior and explicitly not supported.
- */
-public interface DiscoverySpi extends IgniteSpi {
-    /**
-     * Gets collection of remote nodes in grid or empty collection if no remote nodes found.
-     *
-     * @return Collection of remote nodes.
-     */
-    public Collection<ClusterNode> getRemoteNodes();
-
-    /**
-     * Gets local node.
-     *
-     * @return Local node.
-     */
-    public ClusterNode getLocalNode();
-
-    /**
-     * Gets node by ID.
-     *
-     * @param nodeId Node ID.
-     * @return Node with given ID or {@code null} if node is not found.
-     */
-    @Nullable public ClusterNode getNode(UUID nodeId);
-
-    /**
-     * Pings the remote node to see if it's alive.
-     *
-     * @param nodeId Node Id.
-     * @return {@code true} if node alive, {@code false} otherwise.
-     */
-    public boolean pingNode(UUID nodeId);
-
-    /**
-     * Sets node attributes and node version which will be distributed in grid during
-     * join process. Note that these attributes cannot be changed and set only once.
-     *
-     * @param attrs Map of node attributes.
-     * @param ver Product version.
-     */
-    public void setNodeAttributes(Map<String, Object> attrs, IgniteProductVersion ver);
-
-    /**
-     * Sets a listener for discovery events. Refer to
-     * {@link org.apache.ignite.events.IgniteDiscoveryEvent} for a set of all possible
-     * discovery events.
-     * <p>
-     * Note that as of GridGain 3.0.2 this method is called <b>before</b>
-     * method {@link #spiStart(String)} is called. This is done to
-     * avoid potential window when SPI is started but the listener is
-     * not registered yet.
-     *
-     * @param lsnr Listener to discovery events or {@code null} to unset the listener.
-     */
-    public void setListener(@Nullable DiscoverySpiListener lsnr);
-
-    /**
-     * Sets a handler for initial data exchange between GridGain nodes.
-     *
-     * @param exchange Discovery data exchange handler.
-     */
-    public void setDataExchange(DiscoverySpiDataExchange exchange);
-
-    /**
-     * Sets discovery metrics provider. Use metrics provided by
-     * {@link DiscoveryMetricsProvider#getMetrics()} method to exchange
-     * dynamic metrics between nodes.
-     *
-     * @param metricsProvider Provider of metrics data.
-     */
-    public void setMetricsProvider(DiscoveryMetricsProvider metricsProvider);
-
-    /**
-     * Tells discovery SPI to disconnect from topology. This is very close to calling
-     * {@link #spiStop()} with accounting that it is not a full stop,
-     * but disconnect due to segmentation.
-     *
-     * @throws org.apache.ignite.spi.IgniteSpiException If any error occurs.
-     */
-    public void disconnect() throws IgniteSpiException;
-
-    /**
-     * Sets discovery SPI node authenticator. This method is called before SPI start() method.
-     *
-     * @param auth Discovery SPI authenticator.
-     */
-    public void setAuthenticator(DiscoverySpiNodeAuthenticator auth);
-
-    /**
-     * Gets start time of the very first node in the grid. This value should be the same
-     * on all nodes in the grid and it should not change even if very first node fails
-     * of leaves grid.
-     *
-     * @return Start time of the first node in grid or {@code 0} if SPI implementation
-     *         does not support this method.
-     */
-    public long getGridStartTime();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ef8f69b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiDataExchange.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiDataExchange.java b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiDataExchange.java
deleted file mode 100644
index 645eb7b..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiDataExchange.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.discovery;
-
-import java.util.*;
-
-/**
- * Handler for initial data exchange between GridGain nodes. Data exchange
- * is initiated by a new node when it tries to join topology and finishes
- * before it actually joins.
- */
-public interface DiscoverySpiDataExchange {
-    /**
-     * Collects data from all components. This method is called both
-     * on new node that joins topology to transfer its data to existing
-     * nodes and on all existing nodes to transfer their data to new node.
-     *
-     * @param nodeId ID of new node that joins topology.
-     * @return Collection of discovery data objects from different components.
-     */
-    public List<Object> collect(UUID nodeId);
-
-    /**
-     * Notifies discovery manager about data received from remote node.
-     *
-     * @param data Collection of discovery data objects from different components.
-     */
-    public void onExchange(List<Object> data);
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ef8f69b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiHistorySupport.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiHistorySupport.java b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiHistorySupport.java
deleted file mode 100644
index c937736..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiHistorySupport.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.discovery;
-
-import java.lang.annotation.*;
-
-/**
- * This annotation is for all implementations of {@link DiscoverySpi} that support
- * topology snapshots history.
- */
-@Documented
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE})
-public @interface DiscoverySpiHistorySupport {
-    /**
-     * Whether or not target SPI supports topology snapshots history.
-     */
-    @SuppressWarnings({"JavaDoc"})
-    public boolean value();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ef8f69b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiListener.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiListener.java b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiListener.java
deleted file mode 100644
index 2926523..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiListener.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.discovery;
-
-import org.apache.ignite.cluster.*;
-import org.jetbrains.annotations.*;
-
-import java.util.*;
-
-/**
- * Listener for grid node discovery events. See
- * {@link DiscoverySpi} for information on how grid nodes get discovered.
- */
-public interface DiscoverySpiListener {
-    /**
-     * Notification for grid node discovery events.
-     *
-     * @param type Node discovery event type. See {@link org.apache.ignite.events.IgniteDiscoveryEvent}
-     * @param topVer Topology version or {@code 0} if configured discovery SPI implementation
-     *      does not support versioning.
-     * @param node Node affected (e.g. newly joined node, left node, failed node or local node).
-     * @param topSnapshot Topology snapshot after event has been occurred (e.g. if event is
-     *      {@code EVT_NODE_JOINED}, then joined node will be in snapshot).
-     * @param topHist Topology snapshots history.
-     */
-    public void onDiscovery(int type, long topVer, ClusterNode node, Collection<ClusterNode> topSnapshot,
-        @Nullable Map<Long, Collection<ClusterNode>> topHist);
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ef8f69b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiNodeAuthenticator.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiNodeAuthenticator.java b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiNodeAuthenticator.java
deleted file mode 100644
index 8b6b0f4..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiNodeAuthenticator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.discovery;
-
-import org.apache.ignite.cluster.*;
-import org.gridgain.grid.*;
-import org.gridgain.grid.kernal.managers.security.*;
-import org.gridgain.grid.security.*;
-
-/**
- * Node authenticator.
- */
-public interface DiscoverySpiNodeAuthenticator {
-    /**
-     * Security credentials.
-     *
-     * @param node Node to authenticate.
-     * @param cred Security credentials.
-     * @return Security context if authentication succeeded or {@code null} if authentication failed.
-     * @throws GridException If authentication process failed
-     *      (invalid credentials should not lead to this exception).
-     */
-    public GridSecurityContext authenticateNode(ClusterNode node, GridSecurityCredentials cred) throws GridException;
-
-    /**
-     * Gets global node authentication flag.
-     *
-     * @return {@code True} if all nodes in topology should authenticate joining node, {@code false} if only
-     *      coordinator should do the authentication.
-     */
-    public boolean isGlobalNodeAuthentication();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ef8f69b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiOrderSupport.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiOrderSupport.java b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiOrderSupport.java
deleted file mode 100644
index 9934ce6..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/DiscoverySpiOrderSupport.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/* @java.file.header */
-
-/*  _________        _____ __________________        _____
- *  __  ____/___________(_)______  /__  ____/______ ____(_)_______
- *  _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
- *  / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
- *  \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
- */
-
-package org.gridgain.grid.spi.discovery;
-
-import java.lang.annotation.*;
-
-/**
- * This annotation is for all implementations of {@link DiscoverySpi} that support
- * proper node ordering. This includes:
- * <ul>
- * <li>
- * Every node gets an order number assigned to it which is provided via {@link org.apache.ignite.cluster.ClusterNode#order()}
- * method. There is no requirement about order value other than that nodes that join grid
- * at later point of time have order values greater than previous nodes.
- * </li>
- * <li>
- * All {@link org.apache.ignite.events.IgniteEventType#EVT_NODE_JOINED} events come in proper order. This means that all
- * listeners to discovery events will receive discovery notifications in proper order.
- * </li>
- * </ul>
- */
-@Documented
-@Inherited
-@Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.TYPE})
-public @interface DiscoverySpiOrderSupport {
-    /**
-     * Whether or not target SPI supports node startup order.
-     */
-    @SuppressWarnings({"JavaDoc"})
-    public boolean value();
-}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/1ef8f69b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/package.html
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/package.html b/modules/core/src/main/java/org/gridgain/grid/spi/discovery/package.html
deleted file mode 100644
index 77f45f1..0000000
--- a/modules/core/src/main/java/org/gridgain/grid/spi/discovery/package.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<!--
-    @html.file.header
-    _________        _____ __________________        _____
-    __  ____/___________(_)______  /__  ____/______ ____(_)_______
-    _  / __  __  ___/__  / _  __  / _  / __  _  __ `/__  / __  __ \
-    / /_/ /  _  /    _  /  / /_/ /  / /_/ /  / /_/ / _  /  _  / / /
-    \____/   /_/     /_/   \_,__/   \____/   \__,_/  /_/   /_/ /_/
--->
-<html>
-<body>
-    <!-- Package description. -->
-    Contains APIs for topology manager SPI.
-</body>
-</html>