Interface SyncOperator

All Known Implementing Classes:
SyncOperator.Concurrent, SyncOperator.ExecutorDriven, SyncOperator.Final, SyncOperator.Immediate

public interface SyncOperator
Abstraction for various SyncMode-driven behaviors.
  • Method Details

    • submitSyncTask

      void submitSyncTask​(@NotNull Runnable syncTask)
      Submit a synchronization task for immediate or deferred invocation.
      Parameters:
      syncTask - The synchronization task
    • finished

      void finished()
      Declare that no further synchronization tasks will be submitted.
    • awaitAll

      boolean awaitAll​(long timeout, @NotNull TimeUnit timeoutUnit) throws InterruptedException, ExecutionException
      Await successful termination of all synchronization tasks.
      Parameters:
      timeout - The timeout
      timeoutUnit - Units for the timeout
      Returns:
      True on success, false if timed out
      Throws:
      InterruptedException - If this thread was interrupted while awaiting termination
      ExecutionException - If one of the synchronization tasks reported an execution exception