Interface HeartbeatExecutor

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable

    public interface HeartbeatExecutor
    extends java.io.Closeable
    An interface for a heartbeat execution. The HeartbeatThread calls the heartbeat(long) method.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()
      Cleans up any resources used by the heartbeat executor.
      void heartbeat​(long timeLimitMs)
      Implements the heartbeat logic.
    • Method Detail

      • heartbeat

        void heartbeat​(long timeLimitMs)
                throws java.lang.InterruptedException
        Implements the heartbeat logic.
        Parameters:
        timeLimitMs - time limit in milliseconds this heartbeat should not exceed when running
        Throws:
        java.lang.InterruptedException - if the thread is interrupted
      • close

        void close()
        Cleans up any resources used by the heartbeat executor.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable