public abstract class CopyOnWriteTransactionalOwner<T> extends java.lang.Object implements Transactional
Modifier and Type | Field and Description |
---|---|
protected T |
coreState |
protected java.lang.String |
debugName |
Constructor and Description |
---|
CopyOnWriteTransactionalOwner(java.lang.String debugName, T coreState) |
Modifier and Type | Method and Description |
---|---|
void |
commit()
Simply replaces the core state with the transactional state
|
protected abstract T |
getCopyOf(T coreState)
returns a copy of the core state object.
|
java.lang.String |
getName()
A short descriptive name used for debugging purposes.
|
T |
getState(boolean writeAccess) |
boolean |
isModified()
Returns true if this transactional element has been modified in this transaction
|
void |
rollback()
simply discards the scratch pad
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
prepareForCommit
protected java.lang.String debugName
protected T coreState
public CopyOnWriteTransactionalOwner(java.lang.String debugName, T coreState)
public java.lang.String getName()
Transactional
getName
in interface Transactional
protected abstract T getCopyOf(T coreState)
public final T getState(boolean writeAccess)
public final boolean isModified()
public final void commit()
commit
in interface Transactional
public final void rollback()
rollback
in interface Transactional