Interface Work<T>

  • All Known Implementing Classes:
    CompletedWork, TransformWork

    public interface Work<T>
    The interface is used when a function call needs to yield/pause during the process. Users need to call process() until it returns True before getting the result.
    • Method Detail

      • process

        boolean process()
        Call the method to do the work. The caller can keep calling this method until it returns true (i.e., the work is done).
        Returns:
        boolean to indicate if the work has finished.
      • getResult

        T getResult()
        Get the result once the work is done.