public class GSServerTransaction extends ServerTransaction
Transaction.CreatedEMBEDDED_CRASH_COUNT, id, mgr| Constructor and Description |
|---|
GSServerTransaction()
Do not use!.
|
GSServerTransaction(TransactionManager tm,
Object id)
Ctor
|
GSServerTransaction(TransactionManager tm,
Object id,
long lease) |
GSServerTransaction(TransactionManager tm,
Object id,
TransactionParticipantDataImpl metaData) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
Abort the transaction.
|
void |
abort(long l)
Abort the transaction, waiting for participants to be notified of the decision.
|
void |
commit()
Commit the transaction.
|
void |
commit(long l)
Commit the transaction, waiting for participants to be notified of the decision.
|
static GSServerTransaction |
create(TransactionManager tm,
Object id,
long lease) |
ServerTransaction |
createCopy() |
protected ServerTransaction |
createInstance()
Creates an instance of this class for cloning using the
ServerTransaction.createCopy()
method. |
boolean |
equals(Object obj)
Two instances are equal if they have the same transaction manager and the same transaction
id.
|
Object |
getId() |
int |
getState()
Returns the current state of the transaction.
|
int |
hashCode() |
boolean |
isXid() |
void |
join(TransactionParticipant part,
long crashCount)
Join the transaction.
|
void |
join(TransactionParticipant part,
long crashCount,
int partitionId,
String clusterName) |
protected void |
join(TransactionParticipant part,
long crashCount,
int partitionId,
String clusterName,
Object proxy) |
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
create, getLease, getMetaData, getTransactionManager, initEmbedded, isEmbeddedMgrInProxy, isEmbeddedMgrProxySideInstance, isNested, joinIfNeededAndEmbedded, joinIfNeededAndEmbedded, needParticipantsJoin, readFromSwap, setEmbeddedMgrProxySideInstance, setLease, setMetaData, writeToSwapclone, finalize, getClass, notify, notifyAll, wait, wait, waitenabledSmartExternalizableWithReferencepublic GSServerTransaction()
public GSServerTransaction(TransactionManager tm, Object id, long lease)
public GSServerTransaction(TransactionManager tm, Object id)
tm - the local transaction manager for current transactionid - unique id for the transaction, should be Xid for XA transactionspublic GSServerTransaction(TransactionManager tm, Object id, TransactionParticipantDataImpl metaData)
public static GSServerTransaction create(TransactionManager tm, Object id, long lease) throws RemoteException
RemoteExceptionpublic int hashCode()
hashCode in class ServerTransactionpublic boolean equals(Object obj)
ServerTransactionequals in class ServerTransactionpublic String toString()
toString in class ServerTransactionpublic void commit()
throws UnknownTransactionException,
CannotCommitException,
RemoteException
TransactionNOTCHANGED 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.commit in interface Transactioncommit in class ServerTransactionUnknownTransactionException - if the transaction is unknown to the manager. This may be
because the transaction ID was incorrect, or because the
transaction has proceeded to cleanup due to an earlier
commit or abort, and has been forgotten.CannotCommitException - if the transaction reaches the ABORTED state, or is known
to have previously reached that state due to an earlier
commit or abort.RemoteException - if a communication error occurs.public void commit(long l)
throws UnknownTransactionException,
CannotCommitException,
TimeoutExpiredException,
RemoteException
TransactionNOTCHANGED 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.commit in interface Transactioncommit in class ServerTransactionl - timeout to wait, from the start of the call until all participants have been
notified of the transaction manager's decisionUnknownTransactionException - if the transaction is unknown to the manager. This may be
because the transaction ID was incorrect, or because the
transaction has proceeded to cleanup due to an earlier
commit or abort, and has been forgotten.CannotCommitException - if the transaction reaches the ABORTED state, or is known
to have previously reached that state due to an earlier
commit or abort.TimeoutExpiredException - if the timeout expires before all participants have been
notified.RemoteException - if a communication error occurs.public void abort()
throws UnknownTransactionException,
CannotAbortException,
RemoteException
Transactionabort in interface Transactionabort in class ServerTransactionUnknownTransactionException - if the transaction is unknown to the manager. This may be
because the transaction ID was incorrect, or because the
transaction has proceeded to cleanup due to an earlier
commit or abort, and has been forgotten.CannotAbortException - if the transaction is known to have previously reached
the COMMITTED state due to an earlier commit.RemoteException - if a communication error occurs.public void abort(long l)
throws UnknownTransactionException,
CannotAbortException,
TimeoutExpiredException,
RemoteException
TransactionTimeoutExpiredException is thrown.abort in interface Transactionabort in class ServerTransactionl - timeout to wait, from the start of the call until all participants have been
notified of the transaction manager's decision.UnknownTransactionException - if the transaction is unknown to the manager. This may be
because the transaction ID was incorrect, or because the
transaction has proceeded to cleanup due to an earlier
commit or abort, and has been forgotten.CannotAbortException - if the transaction is known to have previously reached
the COMMITTED state due to an earlier commit.TimeoutExpiredException - if the timeout expires before all participants have been
notified.RemoteException - if a communication error occurs.public void join(TransactionParticipant part, long crashCount) throws UnknownTransactionException, CannotJoinException, CrashCountException, RemoteException
ServerTransactioncrashCount 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.join in class ServerTransactionpart - the participant joining the transactioncrashCount - the participant's current crash countUnknownTransactionException - if the transaction is unknown to the transaction manager,
either because the transaction ID is incorrect or because
the transaction is complete and its state has been
discarded by the manager.CannotJoinException - if the transaction is known to the manager but is no
longer active.CrashCountException - if the crash count provided for the participant differs
from the crash count in a previous invocation of the same
pairing of participant and transactionRemoteException - if there is a communication errorprotected void join(TransactionParticipant part, long crashCount, int partitionId, String clusterName, Object proxy) throws UnknownTransactionException, CannotJoinException, CrashCountException, RemoteException
join in class ServerTransactionUnknownTransactionExceptionCannotJoinExceptionCrashCountExceptionRemoteExceptionpublic void join(TransactionParticipant part, long crashCount, int partitionId, String clusterName) throws UnknownTransactionException, CannotJoinException, CrashCountException, RemoteException
join in class ServerTransactionUnknownTransactionExceptionCannotJoinExceptionCrashCountExceptionRemoteExceptionpublic int getState()
throws UnknownTransactionException,
RemoteException
ServerTransactionTransactionConstants values.getState in class ServerTransactionint representing the state of the transactionUnknownTransactionException - if the transaction is unknown to the transaction manager,
either because the transaction ID is incorrect or because
the transaction is complete and its state has been
discarded by the manager.RemoteException - if there is a communication errorTransactionConstantspublic Object getId()
public boolean isXid()
isXid in class ServerTransactionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class ServerTransactionIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class ServerTransactionIOExceptionClassNotFoundExceptionprotected ServerTransaction createInstance()
ServerTransactionServerTransaction.createCopy()
method.createInstance in class ServerTransactionpublic ServerTransaction createCopy()
createCopy in class ServerTransactionCopyright © GigaSpaces.