Package rx.internal.util
Interface BackpressureDrainManager.BackpressureQueueCallback
- All Known Implementing Classes:
OperatorOnBackpressureBuffer.BufferSubscriber
- Enclosing class:
BackpressureDrainManager
public static interface BackpressureDrainManager.BackpressureQueueCallback
Interface representing the minimal callbacks required
to operate the drain part of a backpressure system.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Override this method to deliver an element to downstream.void
Override this method to deliver a normal or exceptional terminal event.peek()
Override this method to peek for the next element, null meaning no next element available now.poll()
Override this method to poll (consume) the next element, null meaning no next element available now.
-
Method Details
-
peek
Object peek()Override this method to peek for the next element, null meaning no next element available now.It will be called plain and while holding this object's monitor.
- Returns:
- the next element or null if no next element available
-
poll
Object poll()Override this method to poll (consume) the next element, null meaning no next element available now.- Returns:
- the next element or null if no next element available
-
accept
Override this method to deliver an element to downstream. The logic ensures that this happens only in the right conditions.- Parameters:
value
- the value to deliver, not null- Returns:
- true indicates that one should terminate the emission loop unconditionally and not deliver any further elements or terminal events.
-
complete
Override this method to deliver a normal or exceptional terminal event.- Parameters:
exception
- if not null, contains the terminal exception
-