T - The implementation class type.public abstract class Snapshot<T extends Snapshot<T>> extends SemiPersistent<T> implements Comparable<T>
| Modifier and Type | Field and Description |
|---|---|
protected long |
timestamp
Timestamp is incrementally generated from it previous value.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Snapshot(long timestamp)
Creates a new
Snapshot initializing its timestamp with the give value. |
| Modifier and Type | Method and Description |
|---|---|
T |
commit(T globalState)
Performs conflict checks and if no conflicts detected returns new instance with all the pending changes applied.
|
int |
compareTo(T otherSnapshot)
Compares snapshot timestamps only. |
cleanCopy, dirtyCopy, updateprotected final long timestamp
protected Snapshot(long timestamp)
Snapshot initializing its timestamp with the give value.
Note: Pass following values
timestamp - The timestamp of the created snapshot.public int compareTo(T otherSnapshot)
Transactional.commit(Object) instead.compareTo in interface Comparable<T extends Snapshot<T>>public T commit(T globalState)
globalState - The current system's global state.ConflictException - When conflicting changes detected.Copyright © 2013 CERN, The European Organization for Nuclear Research. All Rights Reserved.