Package com.iizix.nio

Interface IWorkerTimeout

  • All Known Subinterfaces:
    ISocketComm
    All Known Implementing Classes:
    ServerSocketComm, SocketComm, SocketCommNIO

    public interface IWorkerTimeout
    Timeout interface for the Worker, used by e.g. Socket NIO to handle timeout's, a server sessions heart-beat.
    Author:
    Christopher Mindus
    • Method Detail

      • getRemainingTimeout

        long getRemainingTimeout​(long timeNow)
        Gets the timeout value remaining.
        Parameters:
        timeNow - The current time.
        Returns:
        Time in milliseconds until timeout, NOTE! -1 for indefinite timeout.
      • checkTimeout

        void checkTimeout​(long timeNow)
        Performs a timeout check. This is called to all IWorkerTimeout's, so each channel must check its own state.
        Parameters:
        timeNow - The current time.