net.jini.core.transaction.server
Class NestableServerTransaction
java.lang.Object
|
+--net.jini.core.transaction.server.ServerTransaction
|
+--net.jini.core.transaction.server.NestableServerTransaction
- public class NestableServerTransaction
- extends ServerTransaction
- implements NestableTransaction
Class implementing the NestableTransaction
interface, for use
with transaction participants that implement the default transaction
semantics.
- See Also:
NestableTransaction
,
NestableTransactionManager
,
TransactionFactory
, Serialized Form
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
toString,
wait,
wait,
wait |
parent
public final NestableServerTransaction parent
- The parent transaction, if any.
NestableServerTransaction
public NestableServerTransaction(NestableTransactionManager mgr,
long id,
NestableServerTransaction parent)
- Simple constructor. Clients should not call this directly, but
should instead use
TransactionFactory
and
NestableTransaction
methods.
- Parameters:
mgr
- the manager for this transactionid
- the transaction idparent
- the parent transaction, if any
create
public NestableTransaction.Created create(NestableTransactionManager mgr,
long leaseTime)
throws UnknownTransactionException,
CannotJoinException,
LeaseDeniedException,
java.rmi.RemoteException
- Specified by:
- create in interface NestableTransaction
create
public NestableTransaction.Created create(long leaseTime)
throws UnknownTransactionException,
CannotJoinException,
LeaseDeniedException,
java.rmi.RemoteException
- Specified by:
- create in interface NestableTransaction
promote
public void promote(TransactionParticipant[] parts,
long[] crashCounts,
TransactionParticipant drop)
throws UnknownTransactionException,
CannotJoinException,
CrashCountException,
java.rmi.RemoteException
- Promote the listed participants (from a subtransaction) into
this (the parent) 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:
parts
- the participants being promoted to the parentcrashCounts
- the crash counts of the participantsdrop
- 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:
NestableTransactionManager.promote(long, net.jini.core.transaction.server.TransactionParticipant[], long[], net.jini.core.transaction.server.TransactionParticipant)
enclosedBy
public boolean enclosedBy(NestableTransaction enclosing)
- Return true if the specified transaction is an ancestor of
this transaction.
- Parameters:
enclosing
- transaction to test for being an ancestor
isNested
public boolean isNested()
- Overrides:
- isNested in class ServerTransaction
Copyright © 1999 Sun Microsystems, Inc. All rights reserved