public static interface IReadAccess.Priority<State>
| Modifier and Type | Method and Description |
|---|---|
<Result> Result |
priorityReadOnly(IUnitOfWork<Result,State> work)
Gets a read-only copy of the State and executes
work on it. |
default <Result> Result |
tryPriorityReadOnly(IUnitOfWork<Result,State> work)
Tries to get a read-only copy of the State and execute
work on it. |
default <Result> Result |
tryPriorityReadOnly(IUnitOfWork<Result,State> work,
java.util.function.Supplier<? extends Result> defaultResult)
Tries to get a read-only copy of the State and execute
work on it. |
default <Result> Result |
tryPriorityReadOnly(IUnitOfWork<Result,State> work,
java.util.function.Supplier<? extends Result> defaultResult,
java.util.function.Function<? super java.lang.Exception,? extends Result> exceptionHandler)
Tries to get a read-only copy of the State and execute
work on it. |
<Result> Result priorityReadOnly(IUnitOfWork<Result,State> work)
work on it.
Cancels all cancelable readers before executing the IUnitOfWork.
For interactive jobs that need fastest possible execution.
WARNING: the State passed to work can be null.CancelableUnitOfWorkdefault <Result> Result tryPriorityReadOnly(IUnitOfWork<Result,State> work, java.util.function.Supplier<? extends Result> defaultResult)
work on it.
Cancels all cancelable readers before executing the IUnitOfWork.
For interactive jobs that need fastest possible execution.work - Work to execute on the StatedefaultResult - Supplies a result in case the State is nullwork, or
the result of querying defaultResult if the State is nullCancelableUnitOfWorkdefault <Result> Result tryPriorityReadOnly(IUnitOfWork<Result,State> work)
work on it.
Cancels all cancelable readers before executing the IUnitOfWork.
For interactive jobs that need fastest possible execution.work - Work to execute on the Statework, or
null if the State is nullCancelableUnitOfWorkdefault <Result> Result tryPriorityReadOnly(IUnitOfWork<Result,State> work, java.util.function.Supplier<? extends Result> defaultResult, java.util.function.Function<? super java.lang.Exception,? extends Result> exceptionHandler)
work on it.
Cancels all cancelable readers before executing the IUnitOfWork.
For interactive jobs that need fastest possible execution.work - Work to execute on the StatedefaultResult - Supplies a result in case the State is nullexceptionHandler - Supplies a result in case an exception is raised during executionwork,
the result of querying defaultResult if the State is null, or
the result of executing exceptionHandler in case an exception is raisedCancelableUnitOfWork