Top Description Methods
org.osgi.util.pushstream

public Interface PushbackPolicy<T, U extends BlockingQueue<PushEvent<? extends T>>>

Known Direct Implementers
org.osgi.util.pushstream.ThresholdPushbackPolicy
Annotations
@ConsumerType
@FunctionalInterface
Type Parameters
<T>
The type of the data
<U>
The type of the queue
Imports
java.util.concurrent.BlockingQueue, org.osgi.annotation.versioning.ConsumerType

A PushbackPolicy is used to calculate how much back pressure to apply based on the current buffer. The PushbackPolicy will be called after an event has been queued, and the returned value will be used as back pressure.
See Also
PushbackPolicyOption

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

a back pressure value in nanoseconds
pushback
(U queue)

Given the current state of the queue, determine the level of back pressure that should be applied

Method Detail

pushbackback to summary
public long pushback(U queue) throws Exception

Given the current state of the queue, determine the level of back pressure that should be applied

Returns:long

a back pressure value in nanoseconds