public final class SinkQueueAdapter<T> extends java.lang.Object implements SinkQueueWithCancel<T>
| Constructor and Description |
|---|
SinkQueueAdapter(SinkQueueWithCancel<T> delegate)
INTERNAL API
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel the stream.
|
java.util.concurrent.CompletionStage<java.util.Optional<T>> |
pull()
Method pulls elements from stream and returns future that:
- fails if stream is failed
- completes with None in case if stream is completed
- completes with
Some(element) in case next element is available from stream. |
public SinkQueueAdapter(SinkQueueWithCancel<T> delegate)
delegate - (undocumented)public java.util.concurrent.CompletionStage<java.util.Optional<T>> pull()
SinkQueueSome(element) in case next element is available from stream.public void cancel()
SinkQueueWithCancelcancel in interface SinkQueueWithCancel<T>