T - The type of the dataU - The type of the queue@ConsumerType @FunctionalInterface public interface QueuePolicy<T,U extends java.util.concurrent.BlockingQueue<PushEvent<? extends T>>>
QueuePolicy is used to control how events should be queued in the
current buffer. The QueuePolicy will be called when an event has
arrived.QueuePolicyOption| Modifier and Type | Method and Description |
|---|---|
void |
doOffer(U queue,
PushEvent<? extends T> event)
Enqueue the event and return the remaining capacity available for events
|
void doOffer(U queue, PushEvent<? extends T> event) throws java.lang.Exception
queue - event - java.lang.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 PushEvent.EventType.ERRORCopyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0