Class StoredLongTrail

    • Constructor Detail

      • StoredLongTrail

        public StoredLongTrail​(int nUpdates,
                               int nWorlds,
                               double loadfactor)
        Constructs a trail with predefined size.
        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

      • 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
      • savePreviousState

        public void savePreviousState​(StoredLong v,
                                      long oldValue,
                                      int oldStamp)
        Reacts when a StoredInt is modified: push the former value & timestamp on the stacks.
        Specified by:
        savePreviousState in interface IStoredLongTrail