class TimeoutWorker extends GridWorker {
        /**
         *
         */
        TimeoutWorker() {
            super(
                ctx.config().getIgniteInstanceName(),
                "grid-timeout-worker",
                GridTimeoutProcessor.this.log,
                ctx.workersRegistry()
            );
        }

        /** {@inheritDoc} */
        @Override protected void body() throws InterruptedException {<FILL_FUNCTION_BODY>}
    }

            Throwable err = null;

            try {
                while (!isCancelled()) {
                    updateHeartbeat();

                    long now = U.currentTimeMillis();

                    onIdle();

                    for (Iterator<GridTimeoutObject> iter = timeoutObjs.iterator(); iter.hasNext(); ) {
                        GridTimeoutObject timeoutObj = iter.next();

                        if (timeoutObj.endTime() <= now) {
                            try {
                                boolean rmvd = timeoutObjs.remove(timeoutObj);

                                if (log.isDebugEnabled())
                                    log.debug("Timeout has occurred [obj=" + timeoutObj + ", process=" + rmvd + ']');

                                if (rmvd)
                                    timeoutObj.onTimeout();
                            }
                            catch (Throwable e) {
                                if (isCancelled() && !(e instanceof Error)) {
                                    if (log.isDebugEnabled())
                                        log.debug("Error when executing timeout callback: " + timeoutObj);

                                    return;
                                }

                                U.error(log, "Error when executing timeout callback: " + timeoutObj, e);

                                if (e instanceof Error)
                                    throw e;
                            }
                        }
                        else
                            break;
                    }

                    synchronized (mux) {
                        while (!isCancelled()) {
                            // Access of the first element must be inside of
                            // synchronization block, so we don't miss out
                            // on thread notification events sent from
                            // 'addTimeoutObject(..)' method.
                            GridTimeoutObject first = timeoutObjs.firstx();

                            if (first != null) {
                                long waitTime = first.endTime() - U.currentTimeMillis();

                                if (waitTime > 0) {
                                    blockingSectionBegin();

                                    try {
                                        mux.wait(waitTime);
                                    }
                                    finally {
                                        blockingSectionEnd();
                                    }
                                }
                                else
                                    break;
                            }
                            else {
                                blockingSectionBegin();

                                try {
                                    mux.wait(5000);
                                }
                                finally {
                                    blockingSectionEnd();
                                }
                            }
                        }
                    }
                }
            }
            catch (Throwable t) {
                if (!(t instanceof InterruptedException))
                    err = t;

                throw t;
            }
            finally {
                if (err == null && !isCancelled.get())
                    err = new IllegalStateException("Thread " + name() + " is terminated unexpectedly.");

                if (err instanceof OutOfMemoryError)
                    ctx.failure().process(new FailureContext(CRITICAL_ERROR, err));
                else if (err != null)
                    ctx.failure().process(new FailureContext(SYSTEM_WORKER_TERMINATION, err));
            }

        
<methods>public void collectGridNodeData(org.apache.ignite.spi.discovery.DiscoveryDataBag) ,public void collectJoiningNodeData(org.apache.ignite.spi.discovery.DiscoveryDataBag) ,public org.apache.ignite.internal.GridComponent.DiscoveryDataExchangeType discoveryDataType() ,public void onDisconnected(IgniteFuture<?>) throws org.apache.ignite.IgniteCheckedException,public void onGridDataReceived(org.apache.ignite.spi.discovery.DiscoveryDataBag.GridDiscoveryData) ,public void onJoiningNodeDataReceived(org.apache.ignite.spi.discovery.DiscoveryDataBag.JoiningNodeDiscoveryData) ,public void onKernalStart(boolean) throws org.apache.ignite.IgniteCheckedException,public void onKernalStop(boolean) ,public IgniteInternalFuture<?> onReconnected(boolean) throws org.apache.ignite.IgniteCheckedException,public void printMemoryStats() ,public void start() throws org.apache.ignite.IgniteCheckedException,public void stop(boolean) throws org.apache.ignite.IgniteCheckedException,public java.lang.String toString() ,public org.apache.ignite.spi.IgniteNodeValidationResult validateNode(org.apache.ignite.cluster.ClusterNode) ,public org.apache.ignite.spi.IgniteNodeValidationResult validateNode(org.apache.ignite.cluster.ClusterNode, org.apache.ignite.spi.discovery.DiscoveryDataBag.JoiningNodeDiscoveryData) <variables>private static final java.lang.String DIAGNOSTIC_LOG_CATEGORY,protected final non-sealed org.apache.ignite.internal.GridKernalContext ctx,protected final non-sealed org.apache.ignite.IgniteLogger diagnosticLog,protected final non-sealed org.apache.ignite.IgniteLogger log