public class StoredDoubleChunckTrail extends Object implements IStoredDoubleTrail
IStorage
,
Serialized FormConstructor and Description |
---|
StoredDoubleChunckTrail(int nWorlds)
Constructs a trail with predefined size.
|
Modifier and Type | Method and Description |
---|---|
void |
buildFakeHistory(StoredDouble v,
double initValue,
int olderStamp) |
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(StoredDouble v,
double oldValue,
int oldStamp)
Reacts when a StoredInt is modified: push the former value & timestamp
on the stacks.
|
void |
worldCommit(int worldIndex)
Comits a world: merging it with the previous one.
|
void |
worldPop(int worldIndex)
Moving down to the previous world.
|
void |
worldPush(int worldIndex)
Moving up to the next world.
|
public StoredDoubleChunckTrail(int nWorlds)
nWorlds
- maximal number of worlds that will be storedpublic void worldPush(int worldIndex)
public void worldPop(int worldIndex)
public int getSize()
public void worldCommit(int worldIndex)
worldCommit
in interface IStorage
public void savePreviousState(StoredDouble v, double oldValue, int oldStamp)
savePreviousState
in interface IStoredDoubleTrail
public void buildFakeHistory(StoredDouble v, double initValue, int olderStamp)
buildFakeHistory
in interface IStoredDoubleTrail
public void resizeWorldCapacity(int newWorldCapacity)
ITrailStorage
resizeWorldCapacity
in interface ITrailStorage
newWorldCapacity
- estimation of the required capacityCopyright © 2015. All rights reserved.