Package bbflow
Class pipeline_generic<T,U,V>  
java.lang.Object
bbflow.block<T,V>
 
bbflow.pipeline_generic<T,U,V>  
Pipeline building block allows auto-connection between all types of ff_blocks
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddInputChannel(ff_queue<T> input) add input channel to first block in pipevoidaddOutputChannel(ff_queue<V> output) add output channel to the last element in pipevoidappendBlock(block<Object, Object> newblock, byte MULTI) voidconnect 1-1 the two blocksvoidconnect two blocks.voidconnect 1-1 the two blocks and add to pipelinevoidconnect 1-1 the two blocks and add to pipelinevoidconnect two blocks and add to pipeline.voidconnect two blocks and add to pipeline.get first farm of the pipelineget last farm of pipelinevoidjoin()wait end of all blocks in pipestatic voidpreload()voidstart()start all blocks in pipe 
- 
Field Details
- 
pipe
LinkedList<block> pipe - 
bufferSize
int bufferSize 
 - 
 - 
Constructor Details
- 
pipeline_generic
public pipeline_generic(int bufferSize)  
 - 
 - 
Method Details
- 
preload
public static void preload() - 
createPipe
connect 1-1 the two blocks and add to pipeline- Parameters:
 b1- first blockb2- second blockBLOCKING- type of channelBOUNDED- type of channel
 - 
connect
connect 1-1 the two blocks- Parameters:
 b1- first blockb2- second blockBLOCKING- type of channelBOUNDED- type of channel
 - 
createPipe
connect 1-1 the two blocks and add to pipeline- Parameters:
 b1- first blockb2- second block
 - 
createPipeMulti
public void createPipeMulti(block<T, U> b1, block<U, V> b2, boolean BLOCKING, boolean BOUNDED, byte MULTI) connect two blocks and add to pipeline. See ff_pipeline for reference- Parameters:
 b1- first blockb2- second blockBLOCKING- type of channelBOUNDED- type of channelMULTI- TYPE_1_1, TYPE_1_N, TYPE_Nx1, TYPE_N_N, TYPE_NxM
 - 
connectPipeMulti
public void connectPipeMulti(block<T, U> b1, block<U, V> b2, boolean BLOCKING, boolean BOUNDED, byte MULTI) connect two blocks. See ff_pipeline for reference- Parameters:
 b1- first blockb2- second blockBLOCKING- type of channelBOUNDED- type of channelMULTI- TYPE_1_1, TYPE_1_N, TYPE_Nx1, TYPE_N_N, TYPE_NxM
 - 
createPipeMulti
connect two blocks and add to pipeline. See ff_pipeline for reference- Parameters:
 b1- first blockb2- second blockMULTI- TYPE_1_1, TYPE_1_N, TYPE_Nx1, TYPE_N_N, TYPE_NxM
 - 
addInputChannel
add input channel to first block in pipe- Overrides:
 addInputChannelin classblock<T,V> - Parameters:
 input-
 - 
addOutputChannel
add output channel to the last element in pipe- Overrides:
 addOutputChannelin classblock<T,V> - Parameters:
 output-
 - 
start
public void start()start all blocks in pipe - 
join
public void join()wait end of all blocks in pipe - 
getFirstFarm
get first farm of the pipeline- Returns:
 - first farm or null
 
 - 
getLastFarm
get last farm of pipeline- Returns:
 - last farm or null
 
 - 
appendBlock
 
 -