|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstorage.memory.memTxn
A class for creating and managing transactions. Once it is created, a memTxn can then be used to compose transactions using the addOp() method. If the memTxn is invertable, then the inverse transaction will automatically be constructed as the transaction is being composed.
Field Summary | |
protected java.util.LinkedList |
ops
|
Constructor Summary | |
protected |
memTxn(Repository repo,
boolean invertable)
Create a memTxn which is optionally constructing its own inverse. |
Method Summary | |
TxnOp |
addOp(Node subj,
Operator op)
Create a TxnOp and add it to the list of TxnOps in this Txn. |
Attribution |
attribution()
Who performed the transaction and when? |
boolean |
commit()
Commit the currently accumulated Txn. |
boolean |
committed()
Has this transaction been committed? |
static TxnBuilder |
create(Repository repo)
Create a memTxn to accumulate TxnOps. |
static memTxn |
create(TxnManager provider)
Create a memTxn to accumulate TxnOps. |
static TxnBuilder |
createInvertable(Repository repo)
Create a memTxn to accumulate TxnOps and automatically construct its inverse. |
Txn |
inverse()
A transaction that inverts the actions of this one. |
java.util.List |
ops()
The subjects and operations performed by this transaction. |
Repository |
repository()
The Repository that this transaction was performed against. |
boolean |
resolved()
Has this transaction been resolved? |
storage.framework.TxnResolver |
resolver()
Creates a TxnResolver interface for this Txn. |
boolean |
retractOp(TxnOp op)
Retract a TxnOp from this Txn. |
java.util.List |
subjectList(Node subject)
The List of all TxnOp instances that operate on the given subject. |
java.util.Set |
subjects()
A Set of the subjects that are contained in this Txn. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.LinkedList ops
Constructor Detail |
protected memTxn(Repository repo, boolean invertable)
repo
- the Repository holding this transactioninvertable
- whether or not to construct an inverseMethod Detail |
public static TxnBuilder create(Repository repo)
public static memTxn create(TxnManager provider)
public static TxnBuilder createInvertable(Repository repo)
public Repository repository()
Txn
repository
in interface Txn
public Attribution attribution()
Txn
attribution
in interface Txn
public java.util.List ops()
Txn
ops
in interface Txn
public java.util.Set subjects()
Txn
subjects
in interface Txn
public TxnOp addOp(Node subj, Operator op)
TxnBuilder
addOp
in interface TxnBuilder
subj
- the Node that is operated on by this TxnOpop
- the Operator that modifies/creates the subj Node
public boolean retractOp(TxnOp op)
TxnBuilder
retractOp
in interface TxnBuilder
op
- the TxnOp to be retracted
public java.util.List subjectList(Node subject)
subjectList
in interface Txn
public boolean commit()
TxnBuilder
commit
in interface TxnBuilder
public final Txn inverse()
Txn
inverse
in interface Txn
public boolean committed()
Txn
In other words is it final, or still being accumulated?
committed
in interface Txn
public boolean resolved()
Txn
Are its results reflected in the persistent backing store?
resolved
in interface Txn
public storage.framework.TxnResolver resolver()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |