T
- The type of the dataU
- The type of the queue@ConsumerType @FunctionalInterface public interface QueuePolicy<T,U extends 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 Exception
queue
- event
- 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.ERROR
Copyright © Contributors to the Eclipse Foundation Licensed under the Eclipse Foundation Specification License – v1.0