Class StoredIntVectorTrail

  • All Implemented Interfaces:
    IStorage

    public class StoredIntVectorTrail
    extends Object
    implements IStorage
    Implements a trail with the history of all the stored search vectors.
    • Constructor Detail

      • StoredIntVectorTrail

        public StoredIntVectorTrail​(EnvironmentTrailing env,
                                    int nUpdates,
                                    int nWorlds,
                                    double loadfactor)
        Constructs a trail for the specified environment with the specified numbers of updates and worlds.
        Parameters:
        nUpdates - maximal number of updates that will be stored
        nWorlds - maximal number of worlds that will be stored
        loadfactor - load factor for structures
    • Method Detail

      • savePreviousState

        public void savePreviousState​(StoredIntVector vect,
                                      int index,
                                      int oldValue,
                                      int oldStamp)
        Reacts on the modification of an element in a stored search vector.
      • resizeWorldCapacity

        public void resizeWorldCapacity​(int newWorldCapacity)
      • worldPush

        public void worldPush​(int worldIndex)
        Moving up to the next world.
        Specified by:
        worldPush in interface IStorage
        Parameters:
        worldIndex - current world index
      • worldPop

        public void worldPop​(int worldIndex)
        Moving down to the previous world.
        Specified by:
        worldPop in interface IStorage
        Parameters:
        worldIndex - current world index
      • worldCommit

        public void worldCommit​(int worldIndex)
        Comits a world: merging it with the previous one.
        Specified by:
        worldCommit in interface IStorage