T - the type of the elements which this pipe should transfer.public class BoundedSynchedPipe<T> extends AbstractSynchedPipe<T> implements IMonitorablePipe
cachedTargetStage| Constructor and Description |
|---|
BoundedSynchedPipe(OutputPort<? extends T> sourcePort,
InputPort<T> targetPort,
int capacity) |
| 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() |
long |
getNumPullsSinceAppStart() |
long |
getNumPushesSinceAppStart() |
int |
getNumWaits() |
long |
getPullThroughput() |
long |
getPushThroughput() |
boolean |
isEmpty()
Checks whether the pipe is empty or not.
|
Object |
removeLast()
Retrieves and removes the last element from the pipe.
|
int |
size() |
close, getSignal, isClosed, reportNewElement, sendSignal, waitForStartSignalgetCachedTargetStage, getScheduler, getSourcePort, getTargetPort, hasMore, setScheduler, toStringpublic BoundedSynchedPipe(OutputPort<? extends T> sourcePort, InputPort<T> targetPort, int capacity)
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<T>element - Element which will be addedtrue if the element could be added, false otherwisepublic Object removeLast()
IPiperemoveLast in interface IPipe<T>null if the pipe is currently empty.public boolean isEmpty()
IPipepublic int size()
size in interface IMonitorablePipesize in interface IPipe<T>public int getNumWaits()
getNumWaits in interface IMonitorablePipepublic long getPushThroughput()
getPushThroughput in interface IMonitorablePipepublic long getPullThroughput()
getPullThroughput in interface IMonitorablePipepublic long getNumPushesSinceAppStart()
getNumPushesSinceAppStart in interface IMonitorablePipepublic long getNumPullsSinceAppStart()
getNumPullsSinceAppStart in interface IMonitorablePipepublic int capacity()
capacity in interface IMonitorablePipecapacity in interface IPipe<T>Copyright © 2015–2020. All rights reserved.