choco.mem
Class StoredVectorTrail

java.lang.Object
  extended by choco.mem.StoredVectorTrail
All Implemented Interfaces:
ITrailStorage

public class StoredVectorTrail
extends java.lang.Object
implements ITrailStorage

Implements a trail with the history of all the stored search vectors.


Constructor Summary
StoredVectorTrail(Environment env, int nUpdates, int nWorlds)
          Constructs a trail for the specified environment with the specified numbers of updates and worlds.
 
Method Summary
 int getSize()
          Returns the current size of the stack.
 void resizeWorldCapacity(int newWorldCapacity)
          increase the capacity of the environment to a given number of worlds
 void savePreviousState(StoredVector vect, int index, java.lang.Object oldValue, int oldStamp)
          Reacts on the modification of an element in a stored search vector.
 void worldCommit()
          Comits a world: merging it with the previous one.
 void worldPop()
          Moving down to the previous world.
 void worldPush()
          Moving up to the next world.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoredVectorTrail

public StoredVectorTrail(Environment env,
                         int nUpdates,
                         int nWorlds)
Constructs a trail for the specified environment with the specified numbers of updates and worlds.

Method Detail

savePreviousState

public void savePreviousState(StoredVector vect,
                              int index,
                              java.lang.Object oldValue,
                              int oldStamp)
Reacts on the modification of an element in a stored search vector.


resizeWorldCapacity

public void resizeWorldCapacity(int newWorldCapacity)
Description copied from interface: ITrailStorage
increase the capacity of the environment to a given number of worlds

Specified by:
resizeWorldCapacity in interface ITrailStorage

worldPush

public void worldPush()
Moving up to the next world.

Specified by:
worldPush in interface ITrailStorage

worldPop

public void worldPop()
Moving down to the previous world.

Specified by:
worldPop in interface ITrailStorage

worldCommit

public void worldCommit()
Comits a world: merging it with the previous one.

Specified by:
worldCommit in interface ITrailStorage

getSize

public int getSize()
Returns the current size of the stack.

Specified by:
getSize in interface ITrailStorage