|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.memory.trailing.trail.StoredIntTrail
public final class StoredIntTrail
Implementing storage of historical values for backtrackable integers.
ITrailStorage
Field Summary |
---|
Fields inherited from interface choco.kernel.memory.trailing.trail.ITrailStorage |
---|
LOGGER |
Constructor Summary | |
---|---|
StoredIntTrail(int nUpdates,
int nWorlds)
Constructs a trail with predefined size. |
Method Summary | |
---|---|
void |
clear()
|
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(int wi)
Comits a world: merging it with the previous one. |
void |
worldPop(int wi)
Moving down to the previous world. |
void |
worldPush(int wi)
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(int nUpdates, int nWorlds)
nUpdates
- maximal number of updates that will be storednWorlds
- maximal number of worlds that will be storedMethod Detail |
---|
public void clear()
clear
in interface ITrailStorage
public void worldPush(int wi)
worldPush
in interface ITrailStorage
wi
- public void worldPop(int wi)
worldPop
in interface ITrailStorage
wi
- public int getSize()
getSize
in interface ITrailStorage
public void worldCommit(int wi)
worldCommit
in interface ITrailStorage
wi
- 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 |