| 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() |
void |
close()
May only be invoked by the input port and the owning (target) stage.
|
OutputPort<? extends Object> |
getSourcePort() |
InputPort<Object> |
getTargetPort() |
boolean |
hasMore() |
boolean |
isClosed() |
boolean |
isEmpty()
Checks whether the pipe is empty or not.
|
Object |
removeLast()
Retrieves and removes the last element from the pipe.
|
void |
reportNewElement()
Stages report new elements with this method.
|
void |
sendSignal(ISignal signal)
A stage can pass on a signal by executing this method.
|
void |
setScheduler(PipeScheduler scheduler) |
int |
size() |
void |
waitForStartSignal() |
public static final IPipe<?> INSTANCE
public void add(Object element)
IPipeIPipe.addNonBlocking(Object)).
If it cannot guarantee element delivery in some special situation, it then must throw an exception.public boolean addNonBlocking(Object element)
IPipeaddNonBlocking in interface IPipe<Object>element - Element which will be addedtrue if the element could be added, false otherwisepublic Object removeLast()
IPiperemoveLast in interface IPipe<Object>null if the pipe is currently empty.public boolean isEmpty()
IPipepublic int size()
public OutputPort<? extends Object> getSourcePort()
getSourcePort in interface IPipe<Object>public InputPort<Object> getTargetPort()
getTargetPort in interface IPipe<Object>public void sendSignal(ISignal signal)
IPipesendSignal in interface IPipe<Object>signal - The signal which needs to be passed on.public void reportNewElement()
IPipereportNewElement in interface IPipe<Object>public boolean isClosed()
public boolean hasMore()
public void waitForStartSignal()
throws InterruptedException
waitForStartSignal in interface IPipe<Object>InterruptedExceptionpublic void close()
IPipepublic int capacity()
public void setScheduler(PipeScheduler scheduler)
setScheduler in interface IPipe<Object>Copyright © 2015–2020. All rights reserved.