public enum QueuePolicyOption extends java.lang.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 java.util.concurrent.BlockingQueue<PushEvent<? extends T>>> |
getPolicy() |
static QueuePolicyOption |
valueOf(java.lang.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(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic abstract <T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>> QueuePolicy<T,U> getPolicy()
QueuePolicy
implementationCopyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0