Package ptolemy.backtrack

Examples of ptolemy.backtrack.Checkpoint


            return $CHECKPOINT;
        }

        public final Object $SET$CHECKPOINT(Checkpoint checkpoint) {
            if ($CHECKPOINT != checkpoint) {
                Checkpoint oldCheckpoint = $CHECKPOINT;
                if (checkpoint != null) {
                    $RECORD$$CHECKPOINT.add($CHECKPOINT, checkpoint.getTimestamp());
                    FieldRecord.pushState($RECORDS);
                }
                $CHECKPOINT = checkpoint;
                oldCheckpoint.setCheckpoint(checkpoint);
                checkpoint.addObject(this);
            }
            return this;
        }
View Full Code Here


                     * @throws NoSuchElementException if there are no more elements.
                     */
                    public Object next() {
                        final Map.Entry e = (Map.Entry)super.next();
                        return new Map.Entry() {
                            protected transient Checkpoint $CHECKPOINT = new Checkpoint(this);

                            /**                            
                             * Returns <code>true</code> if the object, o, is also a map entry with an
                             * identical key and value.
                             * @param o the object to compare.
                             * @return <code>true</code> if o is an equivalent map entry.
                             */
                            public boolean equals(Object o) {
                                return e.equals(o);
                            }

                            /**                            
                             * Returns the key of this map entry.
                             * @return the key.
                             */
                            public Object getKey() {
                                return e.getKey();
                            }

                            /**                            
                             * Returns the value of this map entry.
                             * @return the value.
                             */
                            public Object getValue() {
                                return e.getValue();
                            }

                            /**                            
                             * Computes the hash code of this map entry.
                             * The computation is described in the <code>Map</code>
                             * interface documentation.
                             * @return the hash code of this entry.
                             * @see Map#hashCode()
                             */
                            public int hashCode() {
                                return e.hashCode();
                            }

                            /**                            
                             * Blocks the alteration of the value of this map entry.
                             * This method never returns, throwing an exception instead.
                             * @param value The new value.
                             * @throws UnsupportedOperationException as an unmodifiable
                             * map entry does not support the <code>setValue()</code>
                             * operation.
                             */
                            public Object setValue(Object value) {
                                throw new UnsupportedOperationException();
                            }

                            /**                            
                             * Returns a textual representation of the map entry.
                             * @return The map entry as a <code>String</code>.
                             */
                            public String toString() {
                                return e.toString();
                            }

                            public void $COMMIT(long timestamp) {
                                FieldRecord.commit($RECORDS, timestamp, $RECORD$$CHECKPOINT.getTopTimestamp());
                                $RECORD$$CHECKPOINT.commit(timestamp);
                            }

                            public void $RESTORE(long timestamp, boolean trim) {
                                if (timestamp <= $RECORD$$CHECKPOINT.getTopTimestamp()) {
                                    $CHECKPOINT = $RECORD$$CHECKPOINT.restore($CHECKPOINT, this, timestamp, trim);
                                    FieldRecord.popState($RECORDS);
                                    $RESTORE(timestamp, trim);
                                }
                            }

                            public final Checkpoint $GET$CHECKPOINT() {
                                return $CHECKPOINT;
                            }

                            public final Object $SET$CHECKPOINT(Checkpoint checkpoint) {
                                if ($CHECKPOINT != checkpoint) {
                                    Checkpoint oldCheckpoint = $CHECKPOINT;
                                    if (checkpoint != null) {
                                        $RECORD$$CHECKPOINT.add($CHECKPOINT, checkpoint.getTimestamp());
                                        FieldRecord.pushState($RECORDS);
                                    }
                                    $CHECKPOINT = checkpoint;
                                    oldCheckpoint.setCheckpoint(checkpoint);
                                    checkpoint.addObject(this);
                                }
                                return this;
                            }

                            protected transient CheckpointRecord $RECORD$$CHECKPOINT = new CheckpointRecord();

                            private transient FieldRecord[] $RECORDS = new FieldRecord[] {
                                };

                        };
                    }

                    final class _PROXY_ implements Rollbackable {

                        public final void $COMMIT(long timestamp) {
                            $COMMIT_ANONYMOUS(timestamp);
                        }

                        public final void $RESTORE(long timestamp, boolean trim) {
                            $RESTORE_ANONYMOUS(timestamp, trim);
                        }

                        public final Checkpoint $GET$CHECKPOINT() {
                            return $GET$CHECKPOINT_ANONYMOUS();
                        }

                        public final Object $SET$CHECKPOINT(Checkpoint checkpoint) {
                            $SET$CHECKPOINT_ANONYMOUS(checkpoint);
                            return this;
                        }

                    }

                    public void $COMMIT_ANONYMOUS(long timestamp) {
                        FieldRecord.commit($RECORDS, timestamp, $RECORD$$CHECKPOINT.getTopTimestamp());
                        super.$COMMIT(timestamp);
                    }

                    public void $RESTORE_ANONYMOUS(long timestamp, boolean trim) {
                        super.$RESTORE(timestamp, trim);
                    }

                    public final Checkpoint $GET$CHECKPOINT_ANONYMOUS() {
                        return $CHECKPOINT;
                    }

                    public final Object $SET$CHECKPOINT_ANONYMOUS(Checkpoint checkpoint) {
                        if ($CHECKPOINT != checkpoint) {
                            Checkpoint oldCheckpoint = $CHECKPOINT;
                            if (checkpoint != null) {
                                $RECORD$$CHECKPOINT.add($CHECKPOINT, checkpoint.getTimestamp());
                                FieldRecord.pushState($RECORDS);
                            }
                            $CHECKPOINT = checkpoint;
                            oldCheckpoint.setCheckpoint(checkpoint);
                            checkpoint.addObject(new _PROXY_());
                        }
                        return this;
                    }

View Full Code Here

                return $CHECKPOINT;
            }

            public final Object $SET$CHECKPOINT_ANONYMOUS(Checkpoint checkpoint) {
                if ($CHECKPOINT != checkpoint) {
                    Checkpoint oldCheckpoint = $CHECKPOINT;
                    if (checkpoint != null) {
                        $RECORD$$CHECKPOINT.add($CHECKPOINT, checkpoint.getTimestamp());
                        FieldRecord.pushState($RECORDS);
                    }
                    $CHECKPOINT = checkpoint;
                    oldCheckpoint.setCheckpoint(checkpoint);
                    checkpoint.addObject(new _PROXY_());
                }
                return this;
            }
View Full Code Here

                return $CHECKPOINT;
            }

            public final Object $SET$CHECKPOINT_ANONYMOUS(Checkpoint checkpoint) {
                if ($CHECKPOINT != checkpoint) {
                    Checkpoint oldCheckpoint = $CHECKPOINT;
                    if (checkpoint != null) {
                        $RECORD$$CHECKPOINT.add($CHECKPOINT, checkpoint.getTimestamp());
                        FieldRecord.pushState($RECORDS);
                    }
                    $CHECKPOINT = checkpoint;
                    oldCheckpoint.setCheckpoint(checkpoint);
                    checkpoint.addObject(new _PROXY_());
                }
                return this;
            }
View Full Code Here

                    return $CHECKPOINT;
                }

                public final Object $SET$CHECKPOINT_ANONYMOUS(Checkpoint checkpoint) {
                    if ($CHECKPOINT != checkpoint) {
                        Checkpoint oldCheckpoint = $CHECKPOINT;
                        if (checkpoint != null) {
                            $RECORD$$CHECKPOINT.add($CHECKPOINT, checkpoint.getTimestamp());
                            FieldRecord.pushState($RECORDS);
                        }
                        $CHECKPOINT = checkpoint;
                        oldCheckpoint.setCheckpoint(checkpoint);
                        checkpoint.addObject(new _PROXY_());
                    }
                    return this;
                }
View Full Code Here

        return $CHECKPOINT;
    }

    public final Object $SET$CHECKPOINT(Checkpoint checkpoint) {
        if ($CHECKPOINT != checkpoint) {
            Checkpoint oldCheckpoint = $CHECKPOINT;
            if (checkpoint != null) {
                $RECORD$$CHECKPOINT.add($CHECKPOINT, checkpoint.getTimestamp());
                FieldRecord.pushState($RECORDS);
            }
            $CHECKPOINT = checkpoint;
            oldCheckpoint.setCheckpoint(checkpoint);
            checkpoint.addObject(this);
        }
        return this;
    }
View Full Code Here

            return $CHECKPOINT;
        }

        public final Object $SET$CHECKPOINT(Checkpoint checkpoint) {
            if ($CHECKPOINT != checkpoint) {
                Checkpoint oldCheckpoint = $CHECKPOINT;
                if (checkpoint != null) {
                    $RECORD$$CHECKPOINT.add($CHECKPOINT, checkpoint.getTimestamp());
                    FieldRecord.pushState($RECORDS);
                }
                $CHECKPOINT = checkpoint;
                oldCheckpoint.setCheckpoint(checkpoint);
                checkpoint.addObject(this);
            }
            return this;
        }
View Full Code Here

                    return $CHECKPOINT;
                }

                public final Object $SET$CHECKPOINT_ANONYMOUS(Checkpoint checkpoint) {
                    if ($CHECKPOINT != checkpoint) {
                        Checkpoint oldCheckpoint = $CHECKPOINT;
                        if (checkpoint != null) {
                            $RECORD$$CHECKPOINT.add($CHECKPOINT, checkpoint.getTimestamp());
                            FieldRecord.pushState($RECORDS);
                        }
                        $CHECKPOINT = checkpoint;
                        oldCheckpoint.setCheckpoint(checkpoint);
                        checkpoint.addObject(new _PROXY_());
                    }
                    return this;
                }
View Full Code Here

                return $CHECKPOINT;
            }

            public final Object $SET$CHECKPOINT_ANONYMOUS(Checkpoint checkpoint) {
                if ($CHECKPOINT != checkpoint) {
                    Checkpoint oldCheckpoint = $CHECKPOINT;
                    if (checkpoint != null) {
                        $RECORD$$CHECKPOINT.add($CHECKPOINT, checkpoint.getTimestamp());
                        FieldRecord.pushState($RECORDS);
                    }
                    $CHECKPOINT = checkpoint;
                    oldCheckpoint.setCheckpoint(checkpoint);
                    checkpoint.addObject(new _PROXY_());
                }
                return this;
            }
View Full Code Here

                    return $CHECKPOINT;
                }

                public final Object $SET$CHECKPOINT_ANONYMOUS(Checkpoint checkpoint) {
                    if ($CHECKPOINT != checkpoint) {
                        Checkpoint oldCheckpoint = $CHECKPOINT;
                        if (checkpoint != null) {
                            $RECORD$$CHECKPOINT.add($CHECKPOINT, checkpoint.getTimestamp());
                            FieldRecord.pushState($RECORDS);
                        }
                        $CHECKPOINT = checkpoint;
                        oldCheckpoint.setCheckpoint(checkpoint);
                        checkpoint.addObject(new _PROXY_());
                    }
                    return this;
                }
View Full Code Here

TOP

Related Classes of ptolemy.backtrack.Checkpoint

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.