public final class UnsynchedPipe<T> extends AbstractUnsynchedPipe<T>
cachedTargetStage
Constructor and Description |
---|
UnsynchedPipe(OutputPort<? extends T> sourcePort,
InputPort<T> targetPort) |
Modifier and Type | Method and Description |
---|---|
void |
add(Object element)
Adds an element to the pipe.
|
boolean |
addNonBlocking(Object element)
Adds an element to the pipe.
|
int |
capacity() |
boolean |
isEmpty()
Checks whether the pipe is empty or not.
|
Object |
removeLast()
Retrieves and removes the last element from the pipe.
|
int |
size() |
close, isClosed, reportNewElement, sendSignal, waitForStartSignal
getCachedTargetStage, getScheduler, getSourcePort, getTargetPort, hasMore, setScheduler, toString
public UnsynchedPipe(OutputPort<? extends T> sourcePort, InputPort<T> targetPort)
public void add(Object element)
IPipe
IPipe.addNonBlocking(Object)
).
If it cannot guarantee element delivery in some special situation, it then must throw an exception.element
- to be addedpublic boolean addNonBlocking(Object element)
IPipe
element
- Element which will be addedtrue
if the element could be added, false otherwisepublic Object removeLast()
IPipe
null
if the pipe is currently empty.public boolean isEmpty()
IPipe
true
if the pipe is empty, false otherwise.public int size()
public int capacity()
Copyright © 2015–2020. All rights reserved.