org.lightwolf
Class FlowManager

java.lang.Object
  extended by org.lightwolf.FlowManager
Direct Known Subclasses:
SimpleFlowManager

public abstract class FlowManager
extends Object

An object that controls execution of flows by assigning them to actual threads.

Author:
Fernando Colombo

Constructor Summary
FlowManager()
           
 
Method Summary
protected static void clearThread()
           
protected static Flow createBranch(Flow flow, int number)
           
protected abstract  void doStreamedFork(Flow requester, int n)
           
protected abstract  void fork(Flow requester, int n)
           
static FlowManager getDefault()
           
static FlowManager getNext()
           
protected static void prepareFork(Flow flow, int n)
           
protected abstract  ScheduledFuture<?> schedule(Callable<?> callable, long delay, TimeUnit unit)
           
static void setDefault(FlowManager manager)
           
static FlowManager setNext(FlowManager manager)
           
protected abstract  Future<?> submit(Flow requester, Object message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowManager

public FlowManager()
Method Detail

getDefault

public static FlowManager getDefault()

setDefault

public static void setDefault(FlowManager manager)

getNext

public static FlowManager getNext()

setNext

public static FlowManager setNext(FlowManager manager)

clearThread

protected static void clearThread()

prepareFork

protected static void prepareFork(Flow flow,
                                  int n)

createBranch

protected static Flow createBranch(Flow flow,
                                   int number)

fork

protected abstract void fork(Flow requester,
                             int n)

doStreamedFork

protected abstract void doStreamedFork(Flow requester,
                                       int n)

schedule

protected abstract ScheduledFuture<?> schedule(Callable<?> callable,
                                               long delay,
                                               TimeUnit unit)

submit

protected abstract Future<?> submit(Flow requester,
                                    Object message)