?? QueuePolicy<T,U extends BlockingQueue<PushEvent<? extends T>>>
- ????:
T
- The type of the dataU
- The type of the queue
- ????:
- ????????, ????? lambda ??????????????
@ConsumerType
@FunctionalInterface
public interface QueuePolicy<T,U extends BlockingQueue<PushEvent<? extends T>>>
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.- ????:
-
????
-
??????
-
doOffer
Enqueue the event and return the remaining capacity available for events- ??:
queue
-event
-- ??:
Exception
- If an error occurred adding the event to the queue. This exception will cause the connection between thePushEventSource
and thePushEventConsumer
to be closed with anPushEvent.EventType.ERROR
-