public interface Pipe<E>
Modifier and Type | Method and Description |
---|---|
long |
addedCount()
The number of items added to this container since creation.
|
int |
capacity()
The maximum capacity of this container to hold items.
|
int |
drain(java.util.function.Consumer<E> elementHandler)
Drain the number of elements present in a collection at the time the operation starts.
|
int |
drain(java.util.function.Consumer<E> elementHandler,
int limit)
Drain the minimum of a limit and the number of elements present in a collection at the time the operation starts.
|
int |
drainTo(java.util.Collection<? super E> target,
int limit)
Drain available elements into the provided
Collection up to a provided maximum limit of elements. |
int |
remainingCapacity()
Get the remaining capacity for elements in the container given the current size.
|
long |
removedCount()
The number of items removed from this container since creation.
|
long addedCount()
long removedCount()
int capacity()
int remainingCapacity()
int drain(java.util.function.Consumer<E> elementHandler)
If possible, implementations should use smart batching to best handle burst traffic.
elementHandler
- Consumer
for processing elementsint drain(java.util.function.Consumer<E> elementHandler, int limit)
If possible, implementations should use smart batching to best handle burst traffic.
elementHandler
- Consumer
for processing elementslimit
- maximum number of elements to be drained.int drainTo(java.util.Collection<? super E> target, int limit)
Collection
up to a provided maximum limit of elements.
If possible, implementations should use smart batching to best handle burst traffic.
target
- in to which elements are drained.limit
- of the maximum number of elements to drain.Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.