Class SingleResultNodeWorker

  • All Implemented Interfaces:
    Runnable

    public abstract class SingleResultNodeWorker
    extends Object
    implements Runnable
    The workers for single results node. TODO: Add persistence of the last report
    Author:
    AO Industries, Inc.
    • Field Detail

      • persistenceFile

        protected final File persistenceFile
    • Constructor Detail

      • SingleResultNodeWorker

        protected SingleResultNodeWorker​(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.
        Parameters:
        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).