com.sun.sgs.impl.service.transaction
Class TransactionImpl0951

java.lang.Object
  extended by com.sun.sgs.impl.service.transaction.TransactionImpl0951
All Implemented Interfaces:
IPdsTransaction, com.sun.sgs.service.Transaction

public final class TransactionImpl0951
extends Object
implements com.sun.sgs.service.Transaction, IPdsTransaction

Provides an implementation of Transaction. Changes made: The equals method was overwritten because of wrapped transaction classes


Constructor Summary
TransactionImpl0951(long tid, long timeout, com.sun.sgs.profile.ProfileCollector collector)
          Creates an instance with the specified transaction ID, timeout, and collector.
 
Method Summary
 void abort(Throwable cause)
          
 void checkTimeout()
          
 void commit()
          Commits this transaction
 boolean equals(Object object)
          Returns true if the argument is an instance of the same class with the same transaction ID.
 Throwable getAbortCause()
          
 long getCreationTime()
          
 byte[] getId()
          
 long getTimeout()
          
 int hashCode()
          Returns a hash code value for this object.
 boolean isAborted()
          
 void join(com.sun.sgs.service.TransactionParticipant participant)
          
 String toString()
          Returns a string representation of this instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TransactionImpl0951

public TransactionImpl0951(long tid,
                           long timeout,
                           com.sun.sgs.profile.ProfileCollector collector)
Creates an instance with the specified transaction ID, timeout, and collector.

Method Detail

getId

public byte[] getId()

Specified by:
getId in interface com.sun.sgs.service.Transaction

getCreationTime

public long getCreationTime()

Specified by:
getCreationTime in interface com.sun.sgs.service.Transaction

getTimeout

public long getTimeout()

Specified by:
getTimeout in interface com.sun.sgs.service.Transaction

checkTimeout

public void checkTimeout()

Specified by:
checkTimeout in interface com.sun.sgs.service.Transaction

join

public void join(com.sun.sgs.service.TransactionParticipant participant)

Specified by:
join in interface com.sun.sgs.service.Transaction

abort

public void abort(Throwable cause)

Specified by:
abort in interface com.sun.sgs.service.Transaction

isAborted

public boolean isAborted()

Specified by:
isAborted in interface com.sun.sgs.service.Transaction

getAbortCause

public Throwable getAbortCause()

Specified by:
getAbortCause in interface com.sun.sgs.service.Transaction

toString

public String toString()
Returns a string representation of this instance.

Overrides:
toString in class Object
Returns:
a string representation of this instance

equals

public boolean equals(Object object)
Returns true if the argument is an instance of the same class with the same transaction ID.

Overrides:
equals in class Object
Returns:
true if the argument equals this instance, otherwise false

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.

commit

public void commit()
            throws Exception
Commits this transaction

Specified by:
commit in interface IPdsTransaction
Throws:
com.sun.sgs.app.TransactionNotActiveException - if the transaction has been aborted
com.sun.sgs.app.TransactionAbortedException - if a call to prepare on a transaction participant aborts the transaction but does not throw an exception
IllegalStateException - if prepare has been called on any transaction participant and abort has not been called on the transaction
Exception - any exception thrown when calling prepare on a participant
See Also:
TransactionHandle.commit


Copyright © 2008. All Rights Reserved.