net.jini.core.transaction.server
Interface NestableTransactionManager


public abstract interface NestableTransactionManager
extends TransactionManager

The interface used for managers of the two-phase commit protocol for nestable transactions. All nestable transactions must have a transaction manager that runs this protocol.

See Also:
NestableServerTransaction, TransactionParticipant

Inner classes inherited from class net.jini.core.transaction.server.TransactionManager
TransactionManager.Created
 
Fields inherited from class net.jini.core.transaction.server.TransactionConstants
ABORTED, ACTIVE, COMMITTED, NOTCHANGED, PREPARED, VOTING
 
Method Summary
 TransactionManager.Created create(NestableTransactionManager parentMgr, long parentID, long lease)
          Begin a nested transaction, with the specified transaction as parent.
 void promote(long id, TransactionParticipant[] parts, long[] crashCounts, TransactionParticipant drop)
          Promote the listed participants into the specified transaction.
 
Methods inherited from interface net.jini.core.transaction.server.TransactionManager
abort, abort, commit, commit, create, getState, join
 

Method Detail

create

public TransactionManager.Created create(NestableTransactionManager parentMgr,
                                         long parentID,
                                         long lease)
                                  throws UnknownTransactionException,
                                         CannotJoinException,
                                         LeaseDeniedException,
                                         java.rmi.RemoteException
Begin a nested transaction, with the specified transaction as parent.
Parameters:
parentMgr - the manager of the parent transaction
parentID - the id of the parent transaction
lease - the requested lease time for the transaction

promote

public void promote(long id,
                    TransactionParticipant[] parts,
                    long[] crashCounts,
                    TransactionParticipant drop)
             throws UnknownTransactionException,
                    CannotJoinException,
                    CrashCountException,
                    java.rmi.RemoteException
Promote the listed participants into the specified transaction. This method is for use by the manager of a subtransaction when the subtransaction commits. At this point, all participants of the subtransaction must become participants in the parent transaction. Prior to this point, the subtransaction's manager was a participant of the parent transaction, but after a successful promotion it need no longer be one (if it was not itself a participant of the subtransaction), and so it may specify itself as a participant to drop from the transaction. Otherwise, participants should not be dropped out of transactions. For each promoted participant, the participant's crash count is stored in the corresponding element of the crashCounts array.
Parameters:
id - the id of the parent transaction
parts - the participants being promoted to the parent
crashCounts - the crash counts of the participants
drop - the manager to drop out, if any
Throws:
CrashCountException - the crash count of some (at least one) participant is different from the crash count the manager already knows about for that participant
See Also:
TransactionManager.join(long, net.jini.core.transaction.server.TransactionParticipant, long)


Copyright © 1999 Sun Microsystems, Inc. All rights reserved