org.codehaus.gpars

groovyx.gpars.dataflow
[Groovy] Class KanbanLink

java.lang.Object
  groovyx.gpars.dataflow.KanbanLink

@groovy.transform.CompileStatic(value = TypeCheckingMode.PASS)
class KanbanLink

A KanbanLink is the simplest possible producer-consumer pair in a kanban-like scenario as described in

Field Summary
protected DataflowProcessor consumer

protected DataflowQueue downstream

protected DataflowProcessor producer

protected DataflowQueue upstream

 
Property Summary
ProcessingNode consumerSpec

KanbanFlow flow

ProcessingNode producerSpec

 
Constructor Summary
KanbanLink()

 
Method Summary
java.lang.Object addOptimalNumberOfTrays()

Put as many trays into the system as there are processing units.

void addTray()

Putting another tray into system by adding an empty one to the upstream

protected boolean consumerAlreadyStarted()

int getId()

The index of this link in its flow

protected boolean producerAlreadyStarted()

void removeTray()

Removing a tray from the system by fetching the next one from the upstream

void start()

Construct and start the operators if not already started.

void stop()

Immediately terminating all producers and consumers

KanbanLink to(ProcessingNode consumerSpec)

Second part of the sequence link producer to consumer.

 
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

consumer

protected DataflowProcessor consumer


downstream

protected DataflowQueue downstream


producer

protected DataflowProcessor producer


upstream

protected DataflowQueue upstream


 
Property Detail

consumerSpec

ProcessingNode consumerSpec


flow

KanbanFlow flow


producerSpec

ProcessingNode producerSpec


 
Constructor Detail

KanbanLink

KanbanLink()


 
Method Detail

addOptimalNumberOfTrays

java.lang.Object addOptimalNumberOfTrays()
Put as many trays into the system as there are processing units. This is usually the optimal count. *


addTray

void addTray()
Putting another tray into system by adding an empty one to the upstream. *


consumerAlreadyStarted

protected boolean consumerAlreadyStarted()


getId

int getId()
The index of this link in its flow. *


producerAlreadyStarted

protected boolean producerAlreadyStarted()


removeTray

void removeTray()
Removing a tray from the system by fetching the next one from the upstream. *


start

void start()
Construct and start the operators if not already started. No trays are put automatically into the upstream.


stop

void stop()
Immediately terminating all producers and consumers. *


to

KanbanLink to(ProcessingNode consumerSpec)
Second part of the sequence link producer to consumer.
throws:
IllegalArgumentException in case of improper wiring attempts such as cycles or trying to create a chain bottom-up instead of top-down.


 

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