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 class
SyncOperator
implementation forSyncMode.CONCURRENT
.static class
static final class
SyncOperator
implementation forSyncMode.FINAL
.static final class
SyncOperator
implementation forSyncMode.IMMEDIATE
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Await successful termination of all synchronization tasks.void
finished()
Declare that no further synchronization tasks will be submitted.void
submitSyncTask
(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
-