|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.actor.Director
ptolemy.actor.process.ProcessDirector
ptolemy.actor.process.CompositeProcessDirector
ptolemy.domains.pn.kernel.PNDirector
ptolemy.domains.pn.kernel.NondeterministicMerge.MergeDirector
private class NondeterministicMerge.MergeDirector
Variant of the PNDirector for the NondeterministicMerge actor.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj |
---|
NamedObj.ContainedObjectsIterator |
Field Summary |
---|
Fields inherited from class ptolemy.domains.pn.kernel.PNDirector |
---|
_readBlockedQueues, _writeBlockedQueues, initialQueueCapacity, maximumQueueCapacity, READ_BLOCKED, WRITE_BLOCKED |
Fields inherited from class ptolemy.actor.process.ProcessDirector |
---|
_notDone, _stopFireRequested |
Fields inherited from class ptolemy.actor.Director |
---|
_actorsFinishedExecution, _currentTime, _finishRequested, _initializables, _stopRequested, timeResolution |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Fields inherited from interface ptolemy.actor.Executable |
---|
COMPLETED, NOT_READY, STOP_ITERATING |
Constructor Summary | |
---|---|
NondeterministicMerge.MergeDirector(CompositeEntity container,
java.lang.String name)
|
Method Summary | |
---|---|
protected boolean |
_resolveDeadlock()
Attempt to resolve a deadlock and return true if the deadlock no longer exists and successive iterations are allowed; if the deadlock still exists then return false indicating that future iterations are not allowed. |
void |
addThread(java.lang.Thread thread)
Override the base class to delegate to the executive director. |
void |
fire()
Do nothing. |
boolean |
postfire()
Return false since this director has nothing to do. |
void |
removeThread(java.lang.Thread thread)
Override the base class to delegate to the executive director. |
void |
requestInitialization(Actor actor)
Queue an initialization request with the manager. |
void |
threadBlocked(java.lang.Thread thread,
ProcessReceiver receiver)
Override the base class to delegate to the executive director. |
void |
threadBlocked(java.lang.Thread thread,
ProcessReceiver receiver,
boolean readOrWrite)
Override the base class to delegate to the executive director. |
void |
threadHasPaused(java.lang.Thread thread)
Override the base class to delegate to the executive director. |
void |
threadHasResumed(java.lang.Thread thread)
Override the base class to delegate to the executive director. |
void |
threadUnblocked(java.lang.Thread thread,
ProcessReceiver receiver)
Override the base class to delegate to the executive director. |
void |
threadUnblocked(java.lang.Thread thread,
ProcessReceiver receiver,
boolean readOrWrite)
Override the base class to delegate to the executive director. |
void |
wrapup()
Do nothing. |
Methods inherited from class ptolemy.domains.pn.kernel.PNDirector |
---|
_incrementLowestWriteCapacityPort, _resolveInternalDeadlock, addProcessListener, clone, initialize, newReceiver, preinitialize, removeProcessListener, suggestedModalModelDirectors, supportMultirateFiring |
Methods inherited from class ptolemy.actor.process.CompositeProcessDirector |
---|
_areActorsExternallyBlocked, _areThreadsDeadlocked, _controllerBlocked, _controllerUnBlocked, _isInputControllerBlocked, _isOutputControllerBlocked, createBranchController, getInputController, getOutputController, prefire, setModelTime, stopInputBranchController, stopOutputBranchController |
Methods inherited from class ptolemy.actor.process.ProcessDirector |
---|
_areAllThreadsStopped, _getActiveThreadsCount, _getBlockedThreadsCount, _getStoppedThreadsCount, _newProcessThread, finish, initialize, isStopFireRequested, isStopRequested, isThreadActive, stop, stopFire, terminate, transferInputs, transferOutputs |
Methods inherited from class ptolemy.kernel.util.Attribute |
---|
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NondeterministicMerge.MergeDirector(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
IllegalActionException
NameDuplicationException
Method Detail |
---|
public void requestInitialization(Actor actor)
requestInitialization
in class Director
actor
- The actor to initialize.public void addThread(java.lang.Thread thread)
addThread
in class ProcessDirector
thread
- The thread.ProcessDirector.removeThread(Thread)
public void fire()
fire
in interface Executable
fire
in class ProcessDirector
public boolean postfire()
postfire
in interface Executable
postfire
in class PNDirector
public void removeThread(java.lang.Thread thread)
removeThread
in class ProcessDirector
thread
- The thread.ProcessDirector.addThread(Thread)
public void threadBlocked(java.lang.Thread thread, ProcessReceiver receiver)
threadBlocked
in class CompositeProcessDirector
thread
- The thread.receiver
- The receiver handling the I/O operation,
or null if it is not a specific receiver.threadBlocked(Thread, ProcessReceiver, boolean)
public void threadBlocked(java.lang.Thread thread, ProcessReceiver receiver, boolean readOrWrite)
threadBlocked
in class PNDirector
thread
- The thread.receiver
- The receiver handling the I/O operation,
or null if it is not a specific receiver.readOrWrite
- Either READ_BLOCKED or WRITE_BLOCKED
to indicate whether the thread is blocked on read or write.threadBlocked(Thread, ProcessReceiver)
public void threadHasPaused(java.lang.Thread thread)
threadHasPaused
in class ProcessDirector
thread
- The thread.ProcessDirector.addThread(Thread)
public void threadHasResumed(java.lang.Thread thread)
threadHasResumed
in class ProcessDirector
thread
- The thread.ProcessDirector.threadHasPaused(Thread)
public void threadUnblocked(java.lang.Thread thread, ProcessReceiver receiver)
threadUnblocked
in class CompositeProcessDirector
thread
- The thread.receiver
- The receiver handling the I/O operation,
or null if it is not a specific receiver.threadBlocked(Thread, ProcessReceiver)
public void threadUnblocked(java.lang.Thread thread, ProcessReceiver receiver, boolean readOrWrite)
threadUnblocked
in class PNDirector
thread
- The thread.receiver
- The receiver handling the I/O operation,
or null if it is not a specific receiver.readOrWrite
- Either READ_BLOCKED or WRITE_BLOCKED
to indicate whether the thread is blocked on read or write.threadBlocked(Thread, ProcessReceiver, boolean)
public void wrapup()
wrapup
in interface Initializable
wrapup
in class CompositeProcessDirector
protected boolean _resolveDeadlock()
CompositeProcessDirector
If the deadlock is an external deadlock and the containing model of computation is process-oriented, then register the externally blocked receivers with the composite actor that contains this director's composite actor. If the deadlock is an external deadlock and the containing model of computation is schedule-oriented, then end this iteration and return true.
While in special cases it my be useful to override this method for domain specific functionality it is more likely that this method will remain the same and the _resolveInternalDeadlock() method will be overridden for particular models of computation.
_resolveDeadlock
in class CompositeProcessDirector
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |