Class CooldownRestartPolicy

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void notifyRestart()
      Policy might want to keep track of when the latest restarts have happened.
      long restartDelay()
      When the service should restart, in nanoseconds from the point when the service failed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CooldownRestartPolicy

        public CooldownRestartPolicy()
      • CooldownRestartPolicy

        public CooldownRestartPolicy​(long interval,
                                     java.util.concurrent.TimeUnit timeUnit)
        Parameters:
        interval - How long to wait to restart
        timeUnit - The time unit for the interval.
    • Method Detail

      • restartDelay

        public long restartDelay()
        Description copied from interface: ServiceRestartPolicy
        When the service should restart, in nanoseconds from the point when the service failed. A value less than or equal to zero means an immediate restart.
        Specified by:
        restartDelay in interface ServiceRestartPolicy