Enum Class ModelCommitPolicy
- All Implemented Interfaces:
CommitPolicy, Serializable, Comparable<ModelCommitPolicy>, Constable
Controls when an automatic independent-model commit starts and when its completion is awaited.
One command produces one atomic model commit, even when it affects multiple models. The policy therefore applies to the complete consistency boundary rather than to every affected model separately.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionStart commits concurrently at batch completion and await all of them there.Start the commit after the model apply handlers and await it in the handler completion phase.Start after the model apply handlers and await all started commits at batch completion.Resolve the policy from model properties and the active Fluxzero defaults version.Commit at batch completion and process commits in that completion phase sequentially.Commit after the model apply handlers and wait before handler completion finishes. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanasync()Returns whether multiple commits in the same completion phase may run concurrently.booleanReturns whether commit completion is awaited at batch completion rather than handler completion.booleanReturns whether commits start at batch completion rather than handler completion.static ModelCommitPolicyresolve(ModelCommitPolicy declared) Resolves a declared policy using the model override property and the independent-model default.static ModelCommitPolicyReturns the enum constant of this class with the specified name.static ModelCommitPolicy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Resolve the policy from model properties and the active Fluxzero defaults version. -
SYNC_AFTER_HANDLER
Commit after the model apply handlers and wait before handler completion finishes. -
ASYNC_AFTER_HANDLER
Start the commit after the model apply handlers and await it in the handler completion phase. -
ASYNC_AFTER_HANDLER_AWAIT_AFTER_BATCH
Start after the model apply handlers and await all started commits at batch completion. -
SYNC_AFTER_BATCH
Commit at batch completion and process commits in that completion phase sequentially. -
ASYNC_AFTER_BATCH
Start commits concurrently at batch completion and await all of them there.
-
-
Field Details
-
PROPERTY
-
AWAIT_AFTER_HANDLER_COMMITS_BEFORE_RESULTS_PROPERTY
Controls whether request results wait for commits started after model apply handlers and awaited at batch end.- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
commitAfterBatch
public boolean commitAfterBatch()Description copied from interface:CommitPolicyReturns whether commits start at batch completion rather than handler completion.- Specified by:
commitAfterBatchin interfaceCommitPolicy
-
awaitAfterBatch
public boolean awaitAfterBatch()Description copied from interface:CommitPolicyReturns whether commit completion is awaited at batch completion rather than handler completion.- Specified by:
awaitAfterBatchin interfaceCommitPolicy
-
async
public boolean async()Description copied from interface:CommitPolicyReturns whether multiple commits in the same completion phase may run concurrently.- Specified by:
asyncin interfaceCommitPolicy
-
resolve
Resolves a declared policy using the model override property and the independent-model default.Independent models were introduced with
ASYNC_AFTER_HANDLER_AWAIT_AFTER_BATCHas their default, so this does not depend on the defaults version.ASYNC_AFTER_BATCHremains available as an explicit choice.
-