Class GridTimeoutProcessor

    • Constructor Detail

      • GridTimeoutProcessor

        public GridTimeoutProcessor​(GridKernalContext ctx)
        Parameters:
        ctx - Kernal context.
    • Method Detail

      • addTimeoutObject

        public boolean addTimeoutObject​(GridTimeoutObject timeoutObj)
        Parameters:
        timeoutObj - Timeout object.
        Returns:
        True if object was added.
      • schedule

        public GridTimeoutProcessor.CancelableTask schedule​(Runnable task,
                                                            long delay,
                                                            long period)
        Schedule the specified timer task for execution at the specified time with the specified period, in milliseconds.
        Parameters:
        task - Task to execute.
        delay - Delay to first execution in milliseconds.
        period - Period for execution in milliseconds or -1.
        Returns:
        Cancelable to cancel task.
      • removeTimeoutObject

        public boolean removeTimeoutObject​(GridTimeoutObject timeoutObj)
        Parameters:
        timeoutObj - Timeout object.
        Returns:
        True if timeout object was removed.
      • waitAsync

        public void waitAsync​(IgniteInternalFuture<?> fut,
                              long timeout,
                              IgniteBiInClosure<IgniteCheckedException,​Boolean> clo)
        Wait for a future (listen with timeout).
        Parameters:
        fut - Future.
        timeout - Timeout millis. -1 means expired timeout, 0 means waiting without timeout.
        clo - Finish closure. First argument contains error on future or null if no errors, second is true if wait timed out or passed timeout argument means expired timeout.