org.codehaus.gpars

groovyx.gpars.dataflow
[Groovy] Class KanbanFlow

java.lang.Object
  groovyx.gpars.dataflow.KanbanFlow

class KanbanFlow

A KanbanFlow is a network of dataflow connections made up from KanbanLinks. Links can be arranged as to form a chain (1:1), a fork (1:n), a funnel (n:1), a diamond (1:n:1) and any other acyclic directed graph by composition. Cycles are disallowed by default but can be made possible by setting the cycleAllowed property to true. All KanbanLinks in a KanbanFlow share the same PGroup. Per default this group uses a resizeable pool of daemon threads, starting with the GPars default pool size. This can be overridden by setting the pooledGroup property to a custom PGroup.

Authors:
Dierk Koenig
See Also:
KanbanLink


Field Summary
protected java.util.List links

 
Property Summary
boolean cycleAllowed

If adapted, this must be set before calling link()

PGroup pooledGroup

If adapted, this must be set before calling start()

 
Constructor Summary
KanbanFlow()

 
Method Summary
static groovy.lang.Closure inverse(groovy.lang.Closure body)

Helper method that inverses the sequence of Closure parameters

KanbanLink link(ProcessingNode producer)

First part of the sequence link producer to consumer.

KanbanFlow plus(KanbanFlow trailingFlow)

Composes two flows by adding a trailing one to the current one, returning a new one.

void start(int numberOfTrays)

Start all KanbanLinks of this flow with so many trays

void start()

Start all KanbanLinks of this flow with as many trays per link as what is considered optimal

void startEmpty()

Start all KanbanLinks of this flow without any trays

void stop()

Stop all KanbanLinks of this flow

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

links

protected java.util.List links


 
Property Detail

cycleAllowed

boolean cycleAllowed
If adapted, this must be set before calling link()


pooledGroup

PGroup pooledGroup
If adapted, this must be set before calling start()


 
Constructor Detail

KanbanFlow

KanbanFlow()


 
Method Detail

inverse

static groovy.lang.Closure inverse(groovy.lang.Closure body)
Helper method that inverses the sequence of Closure parameters. *


link

KanbanLink link(ProcessingNode producer)
First part of the sequence link producer to consumer.


plus

KanbanFlow plus(KanbanFlow trailingFlow)
Composes two flows by adding a trailing one to the current one, returning a new one. KanbanLinks maintain their state beside that the last link of the current flow is linked to the first link of the trailing flow.


start

void start(int numberOfTrays)
Start all KanbanLinks of this flow with so many trays. *


start

void start()
Start all KanbanLinks of this flow with as many trays per link as what is considered optimal. *


startEmpty

void startEmpty()
Start all KanbanLinks of this flow without any trays. *


stop

void stop()
Stop all KanbanLinks of this flow. *


 

Copyright © 2008–2013 Václav Pech. All Rights Reserved.