ptolemy.backtrack.manual.ptolemy.domains.ct.kernel
Class CTCompositeActor
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.kernel.CompositeEntity
ptolemy.actor.CompositeActor
ptolemy.actor.TypedCompositeActor
ptolemy.backtrack.manual.ptolemy.domains.ct.kernel.CTCompositeActor
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, CTStatefulActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
public class CTCompositeActor
- extends TypedCompositeActor
- implements CTStatefulActor
Composite actor that supports backtracking in the CT domain.
This composite actor records the state of all the actors (atomic or
composite) in it when requested by the Continuous-Time (CT) director. The
CT director may request a rollback to the previous state later.
As a property of CT, only one-level backtracking is needed. This means the
previous states of the actors earlier than the last state can be safely
discarded.
- Since:
- Ptolemy II 5.1
- Version:
- $Id: CTCompositeActor.java 47482 2007-12-06 18:33:55Z cxh $
- Author:
- Thomas Feng
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Constructor Summary |
CTCompositeActor()
Construct a CTCompositeActor in the default workspace with no
container and an empty string as its name. |
CTCompositeActor(CompositeEntity container,
java.lang.String name)
Construct a CTCompositeActor with a name and a container. |
CTCompositeActor(Workspace workspace)
Construct a CTCompositeActor in the specified workspace with
no container and an empty string as a name. |
Method Summary |
void |
goToMarkedState()
Restore the previously recorded state to all the actors in this
composite actor. |
void |
markState()
Record the current state of all the actors in this composite actor. |
Methods inherited from class ptolemy.actor.CompositeActor |
_actorFiring, _actorFiring, _finishedAddEntity, _getPublishedPort, _setDirector, addActorFiringListener, addInitializable, addPiggyback, clone, connectionsChanged, createReceivers, createSchedule, fire, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inferringWidths, inferWidths, initialize, inputPortList, isFireFunctional, isOpaque, isStrict, iterate, linkToPublishedPort, linkToPublishedPort, needsWidthInference, newInsideReceiver, newReceiver, notifyConnectivityChange, outputPortList, postfire, prefire, preinitialize, recordFiring, registerPublisherPort, removeActorFiringListener, removeInitializable, removePiggyback, requestChange, setContainer, setDirector, setManager, stop, stopFire, terminate, unlinkToPublishedPort, unlinkToPublishedPort, unregisterPublisherPort, wrapup |
Methods inherited from class ptolemy.kernel.CompositeEntity |
_adjustDeferrals, _deepOpaqueEntityList, _description, _exportMoMLContents, _recordDecoratedAttributes, _removeEntity, _removeRelation, _validateSettables, allAtomicEntityList, allCompositeEntityList, allowLevelCrossingConnect, classDefinitionList, connect, connect, containedObjectsIterator, deepEntityList, deepGetEntities, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportLinks, exportMoML, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, lazyAllAtomicEntityList, lazyAllCompositeEntityList, lazyClassDefinitionList, lazyDeepEntityList, lazyEntityList, lazyRelationList, numberOfEntities, numberOfRelations, numEntities, numRelations, relationList, removeAllEntities, removeAllRelations, setClassDefinition, statistics, uniqueName |
Methods inherited from class ptolemy.kernel.ComponentEntity |
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CTCompositeActor
public CTCompositeActor()
- Construct a CTCompositeActor in the default workspace with no
container and an empty string as its name. Add the actor to the
workspace directory. You should set the local director or
executive director before attempting to send data to the actor or
to execute it. Increment the version number of the workspace.
CTCompositeActor
public CTCompositeActor(CompositeEntity container,
java.lang.String name)
throws IllegalActionException,
NameDuplicationException
- Construct a CTCompositeActor with a name and a container.
The container argument must not be null, or a
NullPointerException will be thrown. This actor will use the
workspace of the container for synchronization and version counts.
If the name argument is null, then the name is set to the empty string.
Increment the version of the workspace. This actor will have no
local director initially, and its executive director will be simply
the director of the container.
- Parameters:
container
- The container.name
- The name of this actor.
- Throws:
IllegalActionException
- If the container is incompatible
with this actor.
NameDuplicationException
- If the name coincides with
an actor already in the container.
CTCompositeActor
public CTCompositeActor(Workspace workspace)
- Construct a CTCompositeActor in the specified workspace with
no container and an empty string as a name. You can then change
the name with setName(). If the workspace argument is null, then
use the default workspace. You should set the local director or
executive director before attempting to send data to the actor
or to execute it. Add the actor to the workspace directory.
Increment the version number of the workspace.
- Parameters:
workspace
- The workspace that will list the actor.
goToMarkedState
public void goToMarkedState()
throws IllegalActionException
- Restore the previously recorded state to all the actors in this
composite actor.
- Specified by:
goToMarkedState
in interface CTStatefulActor
- Throws:
IllegalActionException
- Not thowned.
markState
public void markState()
- Record the current state of all the actors in this composite actor.
- Specified by:
markState
in interface CTStatefulActor