Interface SingletonTask.Worker

Enclosing class:
SingletonTask

public static interface SingletonTask.Worker
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executes any outstanding operation, or schedule their execution.
    Executes a unit of work.
  • Method Details

    • work

      Executes a unit of work.

      If there is no work to do, this shouldn't do anything.

      Returns:
      A future completing when the executor is allowed to call this method again.
    • complete

      void complete()
      Executes any outstanding operation, or schedule their execution.

      Called when the worker is not expected to work in the foreseeable future.