|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.mem.StoredIntTrail
public final class StoredIntTrail
Implementing storage of historical values for backtrackable integers.
ITrailStorage
Constructor Summary | |
---|---|
StoredIntTrail(Environment env,
int nUpdates,
int nWorlds)
Constructs a trail with predefined size. |
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(StoredInt v,
int oldValue,
int oldStamp)
Reacts when a StoredInt is modified: push the former value & timestamp on the stacks. |
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 |
---|
public StoredIntTrail(Environment env, int nUpdates, int nWorlds)
nUpdates
- maximal number of updates that will be storednWorlds
- maximal number of worlds that will be storedMethod Detail |
---|
public void worldPush()
worldPush
in interface ITrailStorage
public void worldPop()
worldPop
in interface ITrailStorage
public int getSize()
getSize
in interface ITrailStorage
public void worldCommit()
worldCommit
in interface ITrailStorage
public void savePreviousState(StoredInt v, int oldValue, int oldStamp)
public void resizeWorldCapacity(int newWorldCapacity)
ITrailStorage
resizeWorldCapacity
in interface ITrailStorage
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |