Enum Class AggregateCommitPolicy
- All Implemented Interfaces:
Serializable, Comparable<AggregateCommitPolicy>, Constable
Controls when aggregate changes are committed and whether multiple commits in the same completion phase may run
concurrently.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionStart commits at the end of the current message batch and wait for all started commits before the batch completion phase finishes.Start commits after every handler and wait for all started commits at the end of the handler completion phase.Start commits after every handler, keep the aggregate active for the rest of the current batch, and wait for all started commits at the end of the batch completion phase.Resolve the policy from the active Fluxzero defaults version or explicit application properties.Commit at the end of the current message batch and wait for each commit before continuing.Commit after every handler and wait for that commit before the handler completion phase finishes. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringControls whether request results wait for asynchronous aggregate commits that were started after a handler and are awaited at batch completion. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this policy commits at batch completion rather than handler completion.booleanasync()Returns whether this policy allows commits from the same completion phase to run concurrently.booleanReturns whether this policy waits for commit completion at batch completion rather than handler completion.booleanReturns whether this policy commits at batch completion rather than handler completion.static AggregateCommitPolicyReturns the enum constant of this class with the specified name.static AggregateCommitPolicy[]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 the active Fluxzero defaults version or explicit application properties. -
SYNC_AFTER_HANDLER
Commit after every handler and wait for that commit before the handler completion phase finishes. -
ASYNC_AFTER_HANDLER
Start commits after every handler and wait for all started commits at the end of the handler completion phase. -
ASYNC_AFTER_HANDLER_AWAIT_AFTER_BATCH
Start commits after every handler, keep the aggregate active for the rest of the current batch, and wait for all started commits at the end of the batch completion phase. -
SYNC_AFTER_BATCH
Commit at the end of the current message batch and wait for each commit before continuing. -
ASYNC_AFTER_BATCH
Start commits at the end of the current message batch and wait for all started commits before the batch completion phase finishes.
-
-
Field Details
-
AWAIT_AFTER_HANDLER_COMMITS_BEFORE_RESULTS_PROPERTY
Controls whether request results wait for asynchronous aggregate commits that were started after a handler and are awaited at batch completion.This applies to
ASYNC_AFTER_HANDLER_AWAIT_AFTER_BATCH. It does not delay results forSYNC_AFTER_BATCH, because those commits only start at batch completion.Set
fluxzero.aggregate.awaitAfterHandlerCommitsBeforeResults=falseto publish results immediately while preserving the aggregate commit policy's batch-completion wait. Defaults totrue.- 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()Returns whether this policy commits at batch completion rather than handler completion. -
afterBatch
public boolean afterBatch()Returns whether this policy commits at batch completion rather than handler completion. -
awaitAfterBatch
public boolean awaitAfterBatch()Returns whether this policy waits for commit completion at batch completion rather than handler completion.When this is
true, active thread-local aggregates are retained until batch completion as well, so later handlers in the same batch keep seeing the in-memory aggregate until pending commits have completed. -
async
public boolean async()Returns whether this policy allows commits from the same completion phase to run concurrently.
-