Package com.actelion.research.util
Class Pipeline<T>
- java.lang.Object
-
- com.actelion.research.util.Pipeline<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addData(java.util.List<T> li)
void
addData(T t)
void
clear()
long
getAdded()
long
getPolled()
boolean
isAllDataIn()
boolean
isEmpty()
java.util.List<T>
pollAll()
java.util.List<T>
pollAllWithWait()
all data in flag has to be set.T
pollData()
void
reset()
Sets all to 0 and allDataIn to false..void
setAllDataIn()
void
setAllDataIn(boolean allDataIn)
has to be set true orwereAllDataFetched()
will never become true.int
sizePipe()
boolean
wereAllDataFetched()
Returns true if all data in was set and the queue is empty.
-
-
-
Constructor Detail
-
Pipeline
public Pipeline()
-
Pipeline
public Pipeline(java.util.List<T> li)
The 'all data in' flag is set true.- Parameters:
li
-
-
-
Method Detail
-
reset
public void reset()
Sets all to 0 and allDataIn to false..
-
isAllDataIn
public boolean isAllDataIn()
- Specified by:
isAllDataIn
in interfaceIPipeline<T>
-
setAllDataIn
public void setAllDataIn(boolean allDataIn)
has to be set true orwereAllDataFetched()
will never become true.- Specified by:
setAllDataIn
in interfaceIPipeline<T>
-
setAllDataIn
public void setAllDataIn()
-
addData
public void addData(T t)
-
addData
public void addData(java.util.List<T> li)
-
pollData
public T pollData()
- Returns:
- null if nothing is in the queue.
-
sizePipe
public int sizePipe()
-
isEmpty
public boolean isEmpty()
-
getAdded
public long getAdded()
-
getPolled
public long getPolled()
-
pollAllWithWait
public java.util.List<T> pollAllWithWait()
all data in flag has to be set.- Returns:
- all data
-
pollAll
public java.util.List<T> pollAll()
-
wereAllDataFetched
public boolean wereAllDataFetched()
Returns true if all data in was set and the queue is empty.- Specified by:
wereAllDataFetched
in interfaceIPipeline<T>
- Returns:
-
clear
public void clear()
-
-