Package ptolemy.backtrack

Examples of ptolemy.backtrack.Rollbackable


     */
    private void _checkpoint(HashMap<Checkpoint, Long> handles,
            CompositeActor container) {
        Iterator entities = container.entityList(Rollbackable.class).iterator();
        while (entities.hasNext()) {
            Rollbackable entity = (Rollbackable) entities.next();
            Checkpoint checkpointObject = entity.$GET$CHECKPOINT();
            if (!handles.containsKey(checkpointObject)) {
                long handle = checkpointObject.createCheckpoint();
                handles.put(checkpointObject, Long.valueOf(handle));
            }
        }
View Full Code Here


        while (objectsIter.hasNext()) {
            Object object = objectsIter.next();

            if (object instanceof Rollbackable) {
                Rollbackable rollbackObject = (Rollbackable) object;
                Checkpoint checkpoint = rollbackObject.$GET$CHECKPOINT();

                if (!checkpoints.contains(checkpoint)) {
                    // Rollback with the current timestamp.
                    // States taken at the time when the timestamp is created
                    // are restored to the actors managed by this checkpoint
View Full Code Here

        while (objectsIter.hasNext()) {
            Object object = objectsIter.next();

            if (object instanceof Rollbackable) {
                Rollbackable rollbackObject = (Rollbackable) object;
                Checkpoint checkpoint = rollbackObject.$GET$CHECKPOINT();

                if (!checkpoints.contains(checkpoint)) {
                    // FIXME: older states should be discarded.
                    checkpoint.createCheckpoint();
                    checkpoints.add(checkpoint);
View Full Code Here

        Set<Checkpoint> checkpoints = new HashSet<Checkpoint>();
        Iterator<?> objectsIterator = container.containedObjectsIterator();
        while (objectsIterator.hasNext()) {
            Object object = objectsIterator.next();
            if (object instanceof Rollbackable) {
                Rollbackable rollbackObject = (Rollbackable) object;
                Checkpoint checkpoint = rollbackObject.$GET$CHECKPOINT();
                if (!checkpoints.contains(checkpoint)) {
                    long timestamp = checkpoint.createCheckpoint();
                    checkpointsAndHandles.put(checkpoint, new Long(timestamp));
                    checkpoints.add(checkpoint);
                }
View Full Code Here

TOP

Related Classes of ptolemy.backtrack.Rollbackable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.