Enum TaskQueue.ReleasePolicy

java.lang.Object
java.lang.Enum<TaskQueue.ReleasePolicy>
org.bzdev.devqsim.TaskQueue.ReleasePolicy
All Implemented Interfaces:
Serializable, Comparable<TaskQueue.ReleasePolicy>
Enclosing class:
TaskQueue<T>

public static enum TaskQueue.ReleasePolicy extends Enum<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 Details

    • CANCELS_IGNORED

      public static final TaskQueue.ReleasePolicy 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

      public static final TaskQueue.ReleasePolicy CANCELS_AS_RELEASED
      After a call to a release-initiation method, newly canceled events will be counted as released events.
    • REPLACE_CANCELS

      public static final TaskQueue.ReleasePolicy 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

      public static TaskQueue.ReleasePolicy[] 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

      public static TaskQueue.ReleasePolicy valueOf(String name)
      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 name
      NullPointerException - if the argument is null