public enum QueuePolicyOption extends Enum<QueuePolicyOption>
QueuePolicyOption
provides a standard set of simple
QueuePolicy
implementations.QueuePolicy
Enum Constant and Description |
---|
BLOCK
Attempt to add the supplied event to the queue, blocking until the
enqueue is successful.
|
DISCARD_OLDEST
Attempt to add the supplied event to the queue.
|
FAIL
Attempt to add the supplied event to the queue, throwing an exception if
the queue is full.
|
Modifier and Type | Method and Description |
---|---|
abstract <T,U extends BlockingQueue<PushEvent<? extends T>>> |
getPolicy() |
static QueuePolicyOption |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static QueuePolicyOption[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final QueuePolicyOption DISCARD_OLDEST
public static final QueuePolicyOption BLOCK
public static final QueuePolicyOption FAIL
public static QueuePolicyOption[] values()
for (QueuePolicyOption c : QueuePolicyOption.values()) System.out.println(c);
public static QueuePolicyOption valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract <T,U extends BlockingQueue<PushEvent<? extends T>>> QueuePolicy<T,U> getPolicy()
QueuePolicy
implementationCopyright © Contributors to the Eclipse Foundation Licensed under the Eclipse Foundation Specification License – v1.0