Top Description Fields Constructors Methods
org.osgi.util.pushstream

public sealed Enum PushbackPolicyOption

extends Enum<PushbackPolicyOption>
Class Inheritance
Imports
java.util.concurrent.BlockingQueue, java.util.concurrent.atomic.AtomicInteger

PushbackPolicyOption provides a standard set of simple PushbackPolicy implementations.
See Also
PushbackPolicy

Field Summary

Modifier and TypeField and Description
public static final PushbackPolicyOption
FIXED

Returns a fixed amount of back pressure, independent of how full the buffer is

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

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

public static final PushbackPolicyOption
ON_FULL_FIXED

Returns zero back pressure until the buffer is full, then it returns a fixed value

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public abstract <T, U extends BlockingQueue<PushEvent<? extends T>>> PushbackPolicy<T, U>

Returns:

A PushbackPolicy to use
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.

public static PushbackPolicyOption
public static PushbackPolicyOption[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

FIXEDback to summary
public static final PushbackPolicyOption FIXED

Returns a fixed amount of back pressure, independent of how full the buffer is

LINEARback to summary
public static final PushbackPolicyOption 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. The maximum value will be returned when the buffer is full.

ON_FULL_EXPONENTIALback to summary
public static final PushbackPolicyOption 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. Once the buffer is no longer full the back pressure returns to zero.

ON_FULL_FIXEDback to summary
public static final PushbackPolicyOption ON_FULL_FIXED

Returns zero back pressure until the buffer is full, then it returns a fixed value

Constructor Detail

PushbackPolicyOptionback to summary
private PushbackPolicyOption()

Method Detail

getPolicyback to summary
public abstract <T, U extends BlockingQueue<PushEvent<? extends T>>> PushbackPolicy<T, U> 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.

Returns:PushbackPolicy<T, U>

A PushbackPolicy to use

valueOfback to summary
public static PushbackPolicyOption valueOf(String name)
valuesback to summary
public static PushbackPolicyOption[] values()