|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfabric.store.TransactionManager
public class TransactionManager
Constructor Summary | |
---|---|
TransactionManager(ObjectDB database,
java.security.PrivateKey signingKey)
|
Method Summary | |
---|---|
void |
abortTransaction(NodePrincipal worker,
long transactionID)
Instruct the transaction manager that the given transaction is aborting |
void |
commitTransaction(RemoteWorker workerNode,
NodePrincipal workerPrincipal,
long transactionID)
Execute the commit phase of two phase commit. |
Glob |
getGlob(long onum,
RemoteWorker subscriber,
MessageHandlerThread handler)
Returns a Glob containing the specified object. |
ObjectGroup |
getGroup(NodePrincipal principal,
RemoteWorker subscriber,
long onum,
MessageHandlerThread handler)
Returns an ObjectGroup containing the specified object. |
long[] |
newOnums(NodePrincipal worker,
int num)
|
boolean |
prepare(NodePrincipal worker,
PrepareRequest req)
Execute the prepare phase of two phase commit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionManager(ObjectDB database, java.security.PrivateKey signingKey)
Method Detail |
---|
public void abortTransaction(NodePrincipal worker, long transactionID) throws AccessException
AccessException
public void commitTransaction(RemoteWorker workerNode, NodePrincipal workerPrincipal, long transactionID) throws TransactionCommitFailedException
TransactionCommitFailedException
public boolean prepare(NodePrincipal worker, PrepareRequest req) throws TransactionPrepareFailedException
Execute the prepare phase of two phase commit. Validates the transaction to make sure that no conflicts would occur if this transaction were committed. Once prepare returns successfully, the corresponding transaction can only fail if the coordinator aborts it.
The prepare method must check a large number of conditions:
worker
- The worker requesting the prepare
TransactionPrepareFailedException
- If the transaction would cause a conflict or if the worker is
insufficiently privileged to execute the transaction.public Glob getGlob(long onum, RemoteWorker subscriber, MessageHandlerThread handler) throws AccessException
subscriber
- If non-null, then the given worker will be subscribed to the
object as a dissemination node.handler
- Used to track read statistics.
AccessException
public ObjectGroup getGroup(NodePrincipal principal, RemoteWorker subscriber, long onum, MessageHandlerThread handler) throws AccessException
principal
- The principal performing the read.subscriber
- If non-null, then the given worker will be subscribed to the
object as a worker.onum
- The onum for an object that should be in the group.handler
- Used to track read statistics.
AccessException
public long[] newOnums(NodePrincipal worker, int num) throws AccessException
AccessException
- if the principal is not allowed to create objects on this store.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |