T - The implementation collection type.public abstract class SemiPersistent<T> extends Object
| Constructor and Description |
|---|
SemiPersistent() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
cleanCopy()
Creates a new transactional entity from the current one discarding all the local changes.
|
T |
commit(T globalState)
Performs conflict checks and if no conflicts detected returns new instance with all the pending changes applied.
|
protected abstract T |
dirtyCopy()
Copies references to the source data along with local changes and read/write logs.
|
protected abstract void |
update(T changes,
boolean onlyReadLogs)
Updates local changes and change logs using change logs of the arguments.
|
protected abstract T cleanCopy()
protected abstract T dirtyCopy()
SemiPersistent#update(Object) will not work.protected abstract void update(T changes, boolean onlyReadLogs)
dirtyCopy(). changes - The branched collection possibly with updates.onlyReadLogs - If true only read logs are updated. Useful for read-only transactions.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.