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 Classes Modifier and Type Interface Description static classSyncOperator.ConcurrentSyncOperatorimplementation forSyncMode.CONCURRENT.static classSyncOperator.ExecutorDrivenstatic classSyncOperator.FinalSyncOperatorimplementation forSyncMode.FINAL.static classSyncOperator.ImmediateSyncOperatorimplementation forSyncMode.IMMEDIATE. -
Method Summary
Modifier and Type Method Description booleanawaitAll(long timeout, TimeUnit timeoutUnit)Await 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, ExecutionExceptionAwait 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
-