|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mss.ea.al.MessageBroker
Message broker for delivering messages to flow elements.
Field Summary | |
protected java.util.HashMap |
channelMap
Mappings from flow elements to their message channels. |
protected java.util.HashMap |
lockMap
Mapping from flow elements to their locks. |
protected Sync |
mainSync
Lock for this broker. |
protected java.lang.String |
name
Name of this broker. |
protected java.util.LinkedList |
notificationQueue
Queue with notifications about incoming messages. |
protected java.util.HashSet |
operatorSet
Set of operators that are not sources or sinks. |
protected java.util.HashSet |
sinkSet
Set of sink elements. |
protected java.util.HashSet |
sourceSet
Set of source elements. |
protected java.util.HashMap |
stateMap
Mappings from flow elements to their state. |
Constructor Summary | |
MessageBroker()
Constructor. |
Method Summary | |
void |
acquireChannel(java.lang.Object sender)
Acquires a message channel. |
protected boolean |
checkElementsForState(ElementState state)
Checks for a specific state of the all elements. |
protected boolean |
checkForKillCompletion()
Checks if all operators have reached the state DEAD. |
protected boolean |
checkForSetupCompletion()
Checks if all operators have completed their setup. |
protected boolean |
checkForSinkOverflow()
Checks if all sinks have reached the OVERFLOW state. |
protected boolean |
checkForState(ElementState state)
Checks for a specific state of the all elements. |
protected boolean |
checkSinksForState(ElementState state)
Checks for a specific state of the all sink elements. |
protected boolean |
checkSourcesForState(ElementState state)
Checks for a specific state of the all source elements. |
void |
invokeSources()
Invokes the sources elements. |
void |
killOperators()
Kills all operators. |
protected void |
printStateMap()
Prints the state map for debugging. |
protected void |
processMessages()
Processes incoming messages. |
void |
register(FlowElement element)
Registers a flow element at this broker. |
void |
run()
Runs this broker. |
void |
setupOperators()
Sets up all operators. |
java.lang.String |
toString()
Returns a string representation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.lang.String name
protected java.util.HashMap lockMap
protected java.util.HashMap stateMap
protected java.util.HashMap channelMap
protected java.util.HashSet sourceSet
protected java.util.HashSet operatorSet
protected java.util.HashSet sinkSet
protected java.util.LinkedList notificationQueue
protected Sync mainSync
Constructor Detail |
public MessageBroker()
Method Detail |
public void register(FlowElement element)
element
- flow elementpublic void acquireChannel(java.lang.Object sender)
acquireChannel
in interface MessageRecipient
sender
- sender of the notificationpublic void setupOperators()
public void invokeSources()
protected void processMessages()
public void killOperators()
protected boolean checkForState(ElementState state)
state
- state to check forprotected boolean checkSourcesForState(ElementState state)
state
- state to check forprotected boolean checkSinksForState(ElementState state)
state
- state to check forprotected boolean checkElementsForState(ElementState state)
state
- state to check forprotected boolean checkForSetupCompletion()
protected boolean checkForSinkOverflow()
protected boolean checkForKillCompletion()
public void run()
run
in interface java.lang.Runnable
protected void printStateMap()
public java.lang.String toString()
toString
in class java.lang.Object
|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |