Package com.illumon.iris.importers.merge
Interface SyncOperator
- All Known Implementing Classes:
SyncOperator.Concurrent,SyncOperator.ExecutorDriven,SyncOperator.Final,SyncOperator.Immediate
public interface SyncOperator
Abstraction for various
SyncMode-driven behaviors.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classSyncOperatorimplementation forSyncMode.CONCURRENT.static classstatic final classSyncOperatorimplementation forSyncMode.FINAL.static final classSyncOperatorimplementation forSyncMode.IMMEDIATE. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAwait successful termination of all synchronization tasks.voidfinished()Declare that no further synchronization tasks will be submitted.voidsubmitSyncTask(Runnable syncTask) Submit a synchronization task for immediate or deferred invocation.
-
Method Details
-
submitSyncTask
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 timeouttimeoutUnit- Units for the timeout- Returns:
- True on success, false if timed out
- Throws:
InterruptedException- If this thread was interrupted while awaiting terminationExecutionException- If one of the synchronization tasks reported an execution exception
-