Package akka.stream
Interface BoundedSourceQueue<T>
-
public interface BoundedSourceQueue<T>A queue of the given size that gives immediate feedback whether an element could be enqueued or not.Not for user extension
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcomplete()Completes the stream normally.voidfail(java.lang.Throwable ex)Completes the stream with a failure.QueueOfferResultoffer(T elem)Returns aQueueOfferResultthat notifies the caller if the element could be enqueued or not, or the completion status of the queue.intsize()Returns the approximate number of elements in this queue.
-
-
-
Method Detail
-
complete
void complete()
Completes the stream normally.
-
fail
void fail(java.lang.Throwable ex)
Completes the stream with a failure.
-
offer
QueueOfferResult offer(T elem)
Returns aQueueOfferResultthat notifies the caller if the element could be enqueued or not, or the completion status of the queue.A result of
QueueOfferResult.Enqueueddoes not guarantee that an element also has been or will be processed by the downstream.
-
size
int size()
Returns the approximate number of elements in this queue.
-
-