Interface FragmentManager

All Known Implementing Classes:
AbstractFragmentManager, NonRootFragmentManager, RootFragmentManager

public interface FragmentManager
The Fragment Manager is responsible managing incoming data and executing a fragment. Once enough data and resources are avialable, a fragment manager will start a fragment executor to run the associated fragment.
  • Method Details

    • handle

      boolean handle(IncomingDataBatch batch) throws FragmentSetupException, IOException
      Handle the next incoming record batch.
      Parameters:
      batch -
      Returns:
      True if the fragment has enough incoming data to be able to be run.
      Throws:
      FragmentSetupException
      IOException
    • getRunnable

      FragmentExecutor getRunnable()
      Get the fragment runner for this incoming fragment. Note, this can only be requested once.
      Returns:
    • cancel

      void cancel()
    • isCancelled

      boolean isCancelled()
      Find out if the FragmentManager has been cancelled.
      Returns:
      true if the FragmentManager has been cancelled.
    • unpause

      void unpause()
      If the executor is paused (for testing), this method should unpause the executor. This method should handle multiple calls.
    • isWaiting

      boolean isWaiting()
    • getHandle

    • getFragmentContext

      FragmentContext getFragmentContext()
    • receivingFragmentFinished

      void receivingFragmentFinished(ExecProtos.FragmentHandle handle)