public enum PushbackPolicyOption extends Enum<PushbackPolicyOption>
PushbackPolicyOption
provides a standard set of simple
PushbackPolicy
implementations.PushbackPolicy
Enum Constant and Description |
---|
FIXED
Returns a fixed amount of back pressure, independent of how full the
buffer is
|
LINEAR
Returns zero back pressure when the buffer is empty, then it returns a
linearly increasing amount of back pressure based on how full the buffer
is.
|
ON_FULL_EXPONENTIAL
Returns zero back pressure until the buffer is full, then it returns an
exponentially increasing amount, starting with the supplied value and
doubling it each time.
|
ON_FULL_FIXED
Returns zero back pressure until the buffer is full, then it returns a
fixed value
|
Modifier and Type | Method and Description |
---|---|
abstract <T,U extends BlockingQueue<PushEvent<? extends T>>> |
getPolicy(long value)
Create a
PushbackPolicy instance configured with a base back
pressure time in nanoseconds
The actual backpressure returned will vary based on the selected
implementation, the base value, and the state of the buffer. |
static PushbackPolicyOption |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PushbackPolicyOption[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PushbackPolicyOption FIXED
public static final PushbackPolicyOption ON_FULL_FIXED
public static final PushbackPolicyOption ON_FULL_EXPONENTIAL
public static final PushbackPolicyOption LINEAR
public static PushbackPolicyOption[] values()
for (PushbackPolicyOption c : PushbackPolicyOption.values()) System.out.println(c);
public static PushbackPolicyOption 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>>> PushbackPolicy<T,U> getPolicy(long value)
PushbackPolicy
instance configured with a base back
pressure time in nanoseconds
The actual backpressure returned will vary based on the selected
implementation, the base value, and the state of the buffer.value
- PushbackPolicy
to useCopyright © Contributors to the Eclipse Foundation Licensed under the Eclipse Foundation Specification License – v1.0