Class SingleResultWorker

  • All Implemented Interfaces:

    public abstract class SingleResultWorker
    extends Object
    implements Runnable
    The workers for single results node.

    TODO: Add persistence of the last report

    AO Industries, Inc.
    • Field Detail

      • persistenceFile

        protected final File persistenceFile
    • Constructor Detail

      • SingleResultWorker

        protected SingleResultWorker​(File persistenceFile)
    • Method Detail

      • getNextStartupDelay

        protected int getNextStartupDelay()
        The default startup delay is within five minutes.
      • run

        public final void run()
        Specified by:
        run in interface Runnable
      • getSleepDelay

        protected long getSleepDelay​(boolean lastSuccessful,
                                     AlertLevel alertLevel)
        The default sleep delay is five minutes when successful or one minute when unsuccessful.
        alertLevel - When null, treated as AlertLevel.UNKNOWN
      • cancel

        protected void cancel​(Future<String> future)
        Cancels the current getReport call on a best-effort basis. Implementations of this method must not block. This default implementation calls future.cancel(true).