-
public interface IOperationRepoThe operation queue provides a mechanism to queue one or more Operation with the promise it will be executed in a background thread at some point in the future. Operations are automatically persisted to disk in the event of an application being killed, and will be re-queued when the app is started up again.
-
-
Method Summary
Modifier and Type Method Description abstract Unitenqueue(Operation operation, Boolean flush)Enqueue an operation onto the operation repo. abstract BooleanenqueueAndWait(Operation operation, Boolean flush)Enqueue an operation onto the operation repo and "wait" until the operation has been executed. abstract <T extends Operation> BooleancontainsInstanceOf(KClass<T> type)Check if the queue contains a specific operation type abstract UnitawaitInitialized()abstract UnitforceExecuteOperations()-
-
Method Detail
-
enqueue
abstract Unit enqueue(Operation operation, Boolean flush)
Enqueue an operation onto the operation repo.
- Parameters:
operation- The operation that should be executed.flush- Whether to force-flush the operation queue.
-
enqueueAndWait
abstract Boolean enqueueAndWait(Operation operation, Boolean flush)
Enqueue an operation onto the operation repo and "wait" until the operation has been executed.
- Parameters:
operation- The operation that should be executed.flush- Whether to force-flush the operation queue.
-
containsInstanceOf
abstract <T extends Operation> Boolean containsInstanceOf(KClass<T> type)
Check if the queue contains a specific operation type
-
awaitInitialized
abstract Unit awaitInitialized()
-
forceExecuteOperations
abstract Unit forceExecuteOperations()
-
-
-
-