Package org.osgi.util.pushstream
Enum Class QueuePolicyOption
- All Implemented Interfaces:
- Serializable,- Comparable<QueuePolicyOption>,- Constable
QueuePolicyOption provides a standard set of simple
 QueuePolicy implementations.- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionAttempt to add the supplied event to the queue, blocking until the enqueue is successful.Attempt to add the supplied event to the queue.Attempt to add the supplied event to the queue, throwing an exception if the queue is full.
- 
Method SummaryModifier and TypeMethodDescriptionabstract <T,U extends BlockingQueue<PushEvent<? extends T>>> 
 QueuePolicy<T,U> static QueuePolicyOptionReturns the enum constant of this class with the specified name.static QueuePolicyOption[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
DISCARD_OLDESTAttempt to add the supplied event to the queue. If the queue is unable to immediately accept the value then discard the value at the head of the queue and try again. Repeat this process until the event is enqueued.
- 
BLOCKAttempt to add the supplied event to the queue, blocking until the enqueue is successful.
- 
FAILAttempt to add the supplied event to the queue, throwing an exception if the queue is full.
 
- 
- 
Method Details- 
valuesReturns 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
 
- 
valueOfReturns 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 name
- NullPointerException- if the argument is null
 
- 
getPolicy- Returns:
- a QueuePolicyimplementation
 
 
-