|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface used for managers of the two-phase commit protocol for
top-level transactions. All ServerTransaction
objects
are goverened by a transaction manager that runs this protocol.
NestableTransactionManager
,
ServerTransaction
,
TransactionParticipant
Inner Class Summary | |
static class |
TransactionManager.Created
Class that holds return values from create methods. |
Fields inherited from class net.jini.core.transaction.server.TransactionConstants |
ABORTED,
ACTIVE,
COMMITTED,
NOTCHANGED,
PREPARED,
VOTING |
Method Summary | |
void |
abort(long id)
Abort the transaction. |
void |
abort(long id,
long waitFor)
Abort the transaction, waiting for participants to be notified of the decision. |
void |
commit(long id)
Commit the transaction. |
void |
commit(long id,
long waitFor)
Commit the transaction, waiting for participants to be notified of the decision. |
TransactionManager.Created |
create(long lease)
Begin a new top-level transaction. |
int |
getState(long id)
Returns the current state of the given transaction. |
void |
join(long id,
TransactionParticipant part,
long crashCount)
Join a transaction that is managed by this transaction manager. |
Method Detail |
public TransactionManager.Created create(long lease) throws LeaseDeniedException, java.rmi.RemoteException
lease
- the requested lease time for the transactionpublic void join(long id, TransactionParticipant part, long crashCount) throws UnknownTransactionException, CannotJoinException, CrashCountException, java.rmi.RemoteException
crashCount
marks the state of the storage used by
the participant for transactions. If the participant attempts to
join a transaction more than once, the crash counts must be the same.
Each system crash or other event that destroys the state of the
participant's unprepared transaction storage must cause the crash
count to increase by at least one.id
- the transaction idpart
- the participant joining the transactioncrashCount
- the participant's current crash countServerTransaction.join(net.jini.core.transaction.server.TransactionParticipant, long)
public int getState(long id) throws UnknownTransactionException, java.rmi.RemoteException
TransactionConstants
values.ServerTransaction.getState()
,
TransactionConstants
public void commit(long id) throws UnknownTransactionException, CannotCommitException, java.rmi.RemoteException
NOTCHANGED
or the COMMITTED
state, without waiting for the
transaction manager to notify all participants of the decision.
If the transaction must be aborted (because one or more participants
are unable to prepare), CannotCommitException
is thrown
without waiting for the transaction manager to notify all participants
of the decision.id
- the transaction idpublic void commit(long id, long waitFor) throws UnknownTransactionException, CannotCommitException, TimeoutExpiredException, java.rmi.RemoteException
NOTCHANGED
or the
COMMITTED
state, and the transaction manager has
notified all participants of the decision, before the specified
timeout expires. If the transaction must be aborted (because one
or more participants are unable to prepare),
CannotCommitException
is thrown if the transaction
manager is able to notify all participants of the decision before
the specified timeout expires. If the transaction manager reaches
a decision, but is unable to notify all participants of that
decision before the specified timeout expires, then
TimeoutExpiredException
is thrown. If the specified
timeout expires before the transaction manager reaches a decision,
TimeoutExpiredException
is not thrown until the
manager reaches a decision.id
- the transaction idwaitFor
- timeout to wait, from the start of the call until
all participants have been notified of the transaction manager's
decisionpublic void abort(long id) throws UnknownTransactionException, CannotAbortException, java.rmi.RemoteException
id
- the transaction idpublic void abort(long id, long waitFor) throws UnknownTransactionException, CannotAbortException, TimeoutExpiredException, java.rmi.RemoteException
TimeoutExpiredException
is thrown.id
- the transaction idwaitFor
- timeout to wait, from the start of the call until
all participants have been notified of the transaction manager's
decision
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |