- All Implemented Interfaces:
Serializable
,Comparable<TaskQueue.ReleasePolicy>
Policies for handling the case where an event is canceled
while a release is in progress. A release is in progress
starting with a call to one of the release-initiation methods:
forceRelease
,
release
,
releaseUpTo
,
or
forceReleaseUpTo
.
A release ends when either the specified number of events have been
processed so that the release count becomes zero or when the method
clearReleaseCount
has been called.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAfter a call to a release-initiation method, newly canceled events will be counted as released events.After a call to a release-initiation method, newly canceled events do not change the number of events that will be released.After a call to a release-initiation method, when an event is processed, newly added events replace newly canceled events, and the difference is counted as released events. -
Method Summary
Modifier and TypeMethodDescriptionstatic TaskQueue.ReleasePolicy
Returns the enum constant of this type with the specified name.static TaskQueue.ReleasePolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
CANCELS_IGNORED
After a call to a release-initiation method, newly canceled events do not change the number of events that will be released. -
CANCELS_AS_RELEASED
After a call to a release-initiation method, newly canceled events will be counted as released events. -
REPLACE_CANCELS
After a call to a release-initiation method, when an event is processed, newly added events replace newly canceled events, and the difference is counted as released events. The counts of newly added and newly canceled events are reset to zero every time an event on the queue is processed successfully. This policy is intended for cases in which existing events are canceled and new ones added at the same time.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-