class IsolatedDiscoverySpi extends IgniteSpiAdapter implements IgniteDiscoverySpi {
    /** */
    private Serializable consistentId;

    /** */
    private final long startTime = System.currentTimeMillis();

    /** */
    private IsolatedNode locNode;

    /** */
    private DiscoverySpiListener lsnr;

    /** */
    private ExecutorService exec = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());

    /** */
    private DiscoverySpiNodeAuthenticator nodeAuth;

    /** */
    private Marshaller marsh;

    /** {@inheritDoc} */
    @Override public Serializable consistentId() throws IgniteSpiException {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public Collection<ClusterNode> getRemoteNodes() {
        return emptyList();
    }

    /** {@inheritDoc} */
    @Override public ClusterNode getLocalNode() {
        return locNode;
    }

    /** {@inheritDoc} */
    @Override public ClusterNode getNode(UUID nodeId) {
        return locNode.id().equals(nodeId) ? locNode : null;
    }

    /** {@inheritDoc} */
    @Override public boolean pingNode(UUID nodeId) {
        return locNode.id().equals(nodeId);
    }

    /** {@inheritDoc} */
    @Override public void setNodeAttributes(Map<String, Object> attrs, IgniteProductVersion ver) {
        locNode = new IsolatedNode(ignite.configuration().getNodeId(), attrs, ver);
    }

    /** {@inheritDoc} */
    @Override public void setListener(@Nullable DiscoverySpiListener lsnr) {
        this.lsnr = lsnr;
    }

    /** {@inheritDoc} */
    @Override public void setDataExchange(DiscoverySpiDataExchange exchange) {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override public void setMetricsProvider(DiscoveryMetricsProvider metricsProvider) {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override public void disconnect() throws IgniteSpiException {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override public void setAuthenticator(DiscoverySpiNodeAuthenticator auth) {
        nodeAuth = auth;
    }

    /** {@inheritDoc} */
    @Override public long getGridStartTime() {
        return startTime;
    }

    /** {@inheritDoc} */
    @Override public void sendCustomEvent(DiscoverySpiCustomMessage msg) throws IgniteException {
        exec.execute(() -> {
            IgniteFuture<?> fut = lsnr.onDiscovery(new DiscoveryNotification(
                EVT_DISCOVERY_CUSTOM_EVT,
                1,
                locNode,
                singleton(locNode),
                null,
                msg,
                null));

            // Acknowledge message must be send after initial message processed.
            fut.listen((f) -> {
                DiscoverySpiCustomMessage ack = msg.ackMessage();

                if (ack != null) {
                    exec.execute(() -> lsnr.onDiscovery(new DiscoveryNotification(
                        EVT_DISCOVERY_CUSTOM_EVT,
                        1,
                        locNode,
                        singleton(locNode),
                        null,
                        ack,
                        null))
                    );
                }
            });
        });
    }

    /** {@inheritDoc} */
    @Override public void failNode(UUID nodeId, @Nullable String warning) {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override public boolean isClientMode() throws IllegalStateException {
        return false;
    }

    /** {@inheritDoc} */
    @Override public void spiStart(@Nullable String igniteInstanceName) throws IgniteSpiException {
        if (nodeAuth != null) {
            try {
                SecurityCredentials locSecCred = (SecurityCredentials)locNode.attributes().get(ATTR_SECURITY_CREDENTIALS);

                Map<String, Object> attrs = withSecurityContext(
                    authenticateLocalNode(locNode, locSecCred, nodeAuth), locNode.attributes(), marsh);

                attrs.remove(ATTR_SECURITY_CREDENTIALS);

                locNode.setAttributes(attrs);
            }
            catch (IgniteCheckedException e) {
                throw new IgniteSpiException("Failed to authenticate local node (will shutdown local node).", e);
            }
        }

        exec.execute(() -> {
            lsnr.onLocalNodeInitialized(locNode);

            lsnr.onDiscovery(new DiscoveryNotification(
                EVT_NODE_JOINED,
                1,
                locNode,
                singleton(locNode))
            );
        });
    }

    /** {@inheritDoc} */
    @Override public void spiStop() throws IgniteSpiException {
        exec.shutdownNow();
    }

    /** {@inheritDoc} */
    @Override protected void onContextInitialized0(final IgniteSpiContext spiCtx) throws IgniteSpiException {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override public boolean knownNode(UUID nodeId) {
        return getNode(nodeId) != null;
    }

    /** {@inheritDoc} */
    @Override public boolean clientReconnectSupported() {
        return false;
    }

    /** {@inheritDoc} */
    @Override public void clientReconnect() {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override protected void injectResources(Ignite ignite) {
        if (ignite instanceof IgniteKernal)
            marsh = ((IgniteEx)ignite).context().marshallerContext().jdkMarshaller();

        super.injectResources(ignite);
    }

    /** {@inheritDoc} */
    @Override public boolean allNodesSupport(IgniteFeatures feature) {
        if (locNode == null)
            return false;

        return allNodesSupports(singleton(locNode), feature);
    }

    /** {@inheritDoc} */
    @Override public void simulateNodeFailure() {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override public void setInternalListener(IgniteDiscoverySpiInternalListener lsnr) {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override public boolean supportsCommunicationFailureResolve() {
        return false;
    }

    /** {@inheritDoc} */
    @Override public void resolveCommunicationFailure(ClusterNode node, Exception err) {
        // No-op.
    }
}

        if (consistentId == null) {
            IgniteConfiguration cfg = ignite.configuration();

            final Serializable cfgId = cfg.getConsistentId();

            consistentId = cfgId != null ? cfgId : UUID.randomUUID();
        }

        return consistentId;
    
<methods>public long clientFailureDetectionTimeout() ,public long failureDetectionTimeout() ,public void failureDetectionTimeoutEnabled(boolean) ,public boolean failureDetectionTimeoutEnabled() ,public org.apache.ignite.internal.util.IgniteExceptionRegistry getExceptionRegistry() ,public java.lang.String getName() ,public Map<java.lang.String,java.lang.Object> getNodeAttributes() throws org.apache.ignite.spi.IgniteSpiException,public org.apache.ignite.spi.IgniteSpiContext getSpiContext() ,public org.apache.ignite.Ignite ignite() ,public Collection<java.lang.Object> injectables() ,public final void onBeforeStart() ,public void onClientDisconnected(IgniteFuture<?>) ,public void onClientReconnected(boolean) ,public final void onContextDestroyed() ,public final void onContextInitialized(org.apache.ignite.spi.IgniteSpiContext) throws org.apache.ignite.spi.IgniteSpiException,public org.apache.ignite.spi.IgniteSpiAdapter setName(java.lang.String) ,public final boolean started() <variables>private long clientFailureDetectionTimeout,private long failureDetectionTimeout,private boolean failureDetectionTimeoutEnabled,protected org.apache.ignite.Ignite ignite,protected java.lang.String igniteInstanceName,private org.apache.ignite.cluster.ClusterNode locNode,protected org.apache.ignite.IgniteLogger log,private java.lang.String name,private org.apache.ignite.internal.managers.eventstorage.GridLocalEventListener paramsLsnr,private volatile org.apache.ignite.spi.IgniteSpiContext spiCtx,private javax.management.ObjectName spiMBean,private long startTstamp,private final java.util.concurrent.atomic.AtomicBoolean startedFlag