|
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.ThreadSynchronization
Provides synchronization between operator and controller threads.
Field Summary | |
static int |
CLOSE
Deprecated. State indicator CLOSE. |
static int |
COMPLETE
Deprecated. State indicator COMPLETE. |
protected ThreadController |
controller
Deprecated. Controller of the running algorithm. |
static int |
HANGUP
Deprecated. State indicator HANGUP. |
protected java.util.HashSet |
operatorSet
Deprecated. Hash set containing all normal operators. |
static int |
REQUEST_HANGUP
Deprecated. State indicator REQUEST_HANGUP. |
static int |
REQUEST_RUN
Deprecated. State indicator REQUEST_RUN. |
static int |
REQUEST_STANDBY
Deprecated. State indicator REQUEST_STANDBY. |
static int |
RUN
Deprecated. State indicator RUN. |
static int |
SETUP
Deprecated. State indicator SETUP. |
protected java.util.HashSet |
sinkSet
Deprecated. Hash set containing all sinks. |
protected java.util.HashSet |
sourceSet
Deprecated. Hash set containing all sources. |
static int |
STANDBY
Deprecated. State indicator STANDBY. |
protected java.util.HashMap |
stateMap
Deprecated. Hash map with mappings from operators to their current states. |
protected java.lang.ThreadGroup |
threadGroup
Deprecated. Threadgroup containing all threads that are created during the algorithm. |
static int |
WAIT
Deprecated. State indicator WAIT. |
Constructor Summary | |
ThreadSynchronization(ThreadController tc)
Deprecated. Constructor. |
Method Summary | |
protected boolean |
checkHangup()
Deprecated. Checks if operators have reached the HANGUP state. |
protected boolean |
checkPredecessorComplete(ThreadOperator operator)
Deprecated. Checks if all predecessors have reached the COMPLETE state. |
protected boolean |
checkSinkCompletion()
Deprecated. Checks, if sinks have reached the CLOSE state. |
protected boolean |
checkStandby()
Deprecated. Checks, if all operators have reached the STANDBY state. |
protected boolean |
checkState(ThreadOperator operator,
int state)
Deprecated. Checks the state of an operator. |
void |
dumpState()
Deprecated. Dumps the states of all operators to System.out (ONLY FOR DEBUGGING). |
java.util.HashSet |
getOperators()
Deprecated. Gets the registered operators. |
java.util.HashSet |
getSinks()
Deprecated. Gets the registered sinks. |
java.util.HashSet |
getSources()
Deprecated. Gets the registered sources. |
protected int |
getState(ThreadOperator operator)
Deprecated. Gets the current state of an operator. |
void |
register(ThreadOperator operator)
Deprecated. Registers a new operator. |
protected void |
setState(ThreadOperator operator,
int state)
Deprecated. Sets the state of an operator. |
void |
signalizeHangup()
Deprecated. Signal REQUEST_HANGUP to all operators. |
void |
signalizeHangup(ThreadOperator operator)
Deprecated. Signal that the HANGUP state has been reached. |
void |
signalizeOperation(ThreadOperator operator)
Deprecated. Signal RUN. |
void |
signalizeOperationRequest(ThreadOperator operator)
Deprecated. Sets the REQUEST_RUN signal to an operator. |
void |
signalizeSinkClose(SinkThread sink)
Deprecated. Signal CLOSE from a sink. |
void |
signalizeSourceRunning()
Deprecated. Signal REQUEST_RUN to all sources. |
void |
signalizeStandby()
Deprecated. Signalizes all operator to go to STANDBY state. |
void |
signalizeStandby(ThreadOperator operator)
Deprecated. Signal that the STANDBY state has been reached. |
void |
waitForever()
Deprecated. Caller will wait forever (ONLY FOR DEBUGGING). |
void |
waitForever(ThreadOperator operator)
Deprecated. Target will wait forever (ONLY FOR DEBUGGING). |
void |
waitForHangup()
Deprecated. Wait for HANGUP signal from all operators. |
void |
waitForOperation(ThreadOperator operator)
Deprecated. Wait for further requests. |
void |
waitForOperationOrHangup(ThreadOperator operator)
Deprecated. Wait for REQUEST_RUN of HANGUP signal. |
void |
waitForSinkCompletion()
Deprecated. Wait for COMPLETE signal from all sinks. |
void |
waitForStandbyCompletion()
Deprecated. Wait for all operators to reach STANDBY state. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SETUP
public static final int REQUEST_STANDBY
public static final int REQUEST_RUN
public static final int REQUEST_HANGUP
public static final int STANDBY
public static final int RUN
public static final int WAIT
public static final int COMPLETE
public static final int HANGUP
public static final int CLOSE
protected ThreadController controller
protected java.util.HashMap stateMap
protected java.util.HashSet sourceSet
protected java.util.HashSet operatorSet
protected java.util.HashSet sinkSet
protected java.lang.ThreadGroup threadGroup
Constructor Detail |
public ThreadSynchronization(ThreadController tc)
tc
- controller of the algorithmMethod Detail |
public void signalizeStandby()
public void signalizeStandby(ThreadOperator operator)
operator
- producer of the signalpublic void waitForStandbyCompletion()
protected boolean checkStandby()
public void signalizeSourceRunning()
public void waitForSinkCompletion()
protected boolean checkSinkCompletion()
public void signalizeHangup()
public void signalizeHangup(ThreadOperator operator)
operator
- producer of the signalpublic void waitForHangup()
protected boolean checkHangup()
public void waitForOperation(ThreadOperator operator)
operator
- producer of the wait signalprotected boolean checkPredecessorComplete(ThreadOperator operator)
operator
- public void signalizeOperationRequest(ThreadOperator operator)
operator
- target of the signalpublic void signalizeOperation(ThreadOperator operator)
operator
- producer of the signalpublic void signalizeSinkClose(SinkThread sink)
sink
- producer of the signalpublic void waitForOperationOrHangup(ThreadOperator operator)
operator
- producer of the wait signal.public void register(ThreadOperator operator)
operator
- operator to registerprotected int getState(ThreadOperator operator)
operator
- protected void setState(ThreadOperator operator, int state)
operator
- operator which state should be setstate
- new state of the operatorprotected boolean checkState(ThreadOperator operator, int state)
operator
- operator to checkstate
- state to check forpublic java.util.HashSet getSources()
public java.util.HashSet getOperators()
public java.util.HashSet getSinks()
public void dumpState()
public void waitForever()
public void waitForever(ThreadOperator operator)
operator
- target of the call
|
eaLib API Docs Last Modified : January 7 2002 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |