Top Description Methods
org.osgi.util.pushstream

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

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, org.osgi.util.pushstream.PushEvent.EventType

A QueuePolicy is used to control how events should be queued in the current buffer. The QueuePolicy will be called when an event has arrived.
See Also
QueuePolicyOption

Method Summary

Modifier and TypeMethod and Description
public void
doOffer(U queue, PushEvent<? extends T> event)

Enqueue the event and return the remaining capacity available for events

Method Detail

doOfferback to summary
public void doOffer(U queue, PushEvent<? extends T> event) throws Exception

Enqueue the event and return the remaining capacity available for events

Exceptions
Exception:
If an error occurred adding the event to the queue. This exception will cause the connection between the PushEventSource and the PushEventConsumer to be closed with an EventType#ERROR