T
- the type of the elements which this pipe should transfer.public interface IPipe<T>
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 T> |
getSourcePort() |
InputPort<T> |
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()
Deprecated.
since 3.0. Is removed without replacement.
|
void |
sendSignal(ISignal signal)
A stage can pass on a signal by executing this method.
|
void |
setScheduler(PipeScheduler scheduler) |
int |
size() |
void |
waitForStartSignal() |
void add(Object element)
addNonBlocking(Object)
).
If it cannot guarantee element delivery in some special situation, it then must throw an exception.element
- to be addedboolean addNonBlocking(Object element)
element
- Element which will be addedtrue
if the element could be added, false otherwiseboolean isEmpty()
true
if the pipe is empty, false otherwise.int size()
int capacity()
Object removeLast()
null
if the pipe is currently empty.OutputPort<? extends T> getSourcePort()
void sendSignal(ISignal signal)
signal
- The signal which needs to be passed on.@Deprecated void reportNewElement()
boolean isClosed()
true
if the pipe is closed, that is, if the pipe is empty and if the source stage will not send any elements anymore (because the
stage has finished its whole work);
returns false
in all other cases.boolean hasMore()
true
if the pipe is not empty, that is, if the pipe contains at least one element.void close()
void waitForStartSignal() throws InterruptedException
InterruptedException
void setScheduler(PipeScheduler scheduler)
Copyright © 2015–2020. All rights reserved.