public class History
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static NodeAction |
STORAGE_TRIGGER_ALL
Store all transformations.
|
static NodeAction |
STORAGE_TRIGGER_NON_ANONYMOUS
Store only non-anonymous transformations.
|
Constructor and Description |
---|
History(int rowCount,
int size,
double snapshotSizeDataset,
double snapshotSizeSnapshot,
ARXConfiguration.ARXConfigurationInternal config,
IntArrayDictionary dictionarySensValue,
IntArrayDictionary dictionarySensFreq)
Creates a new history.
|
Modifier and Type | Method and Description |
---|---|
int[] |
get(Node node)
Retrieves a snapshot.
|
IntArrayDictionary |
getDictionarySensFreq()
Method needed for benchmarking.
|
IntArrayDictionary |
getDictionarySensValue()
Method needed for benchmarking.
|
NodeAction |
getStorageTrigger()
Returns the current storage strategy.
|
Node |
getTransformation()
Returns the node backing the last returned snapshot.
|
void |
reset()
Clears the history.
|
void |
setSize(int size)
Sets the size of this history.
|
void |
setStorageTrigger(NodeAction trigger)
Set the storage strategy.
|
int |
size() |
boolean |
store(Node transformation,
HashGroupify groupify,
int[] snapshot)
Stores a snapshot in the buffer.
|
public static final NodeAction STORAGE_TRIGGER_NON_ANONYMOUS
public static final NodeAction STORAGE_TRIGGER_ALL
public History(int rowCount, int size, double snapshotSizeDataset, double snapshotSizeSnapshot, ARXConfiguration.ARXConfigurationInternal config, IntArrayDictionary dictionarySensValue, IntArrayDictionary dictionarySensFreq)
rowCount
- the row countsize
- the max sizesnapshotSizeDataset
- the snapshotSizeDatasetsnapshotSizeSnapshot
- config
- dictionarySensValue
- dictionarySensFreq
- public int[] get(Node node)
node
- the nodepublic IntArrayDictionary getDictionarySensFreq()
public IntArrayDictionary getDictionarySensValue()
public NodeAction getStorageTrigger()
public Node getTransformation()
public void reset()
public void setSize(int size)
size
- public void setStorageTrigger(NodeAction trigger)
trigger
- public int size()
public boolean store(Node transformation, HashGroupify groupify, int[] snapshot)
transformation
- The transformationgroupify
- The groupify operatorsnapshot
- The snapshot that was previously used, if any