com.j_spaces.core.client
Class TransactionInfo

java.lang.Object
  extended by com.j_spaces.core.client.TransactionInfo
All Implemented Interfaces:
Serializable

public class TransactionInfo
extends Object
implements Serializable

Transaction information.

See Also:
Serialized Form

Nested Class Summary
static class TransactionInfo.Types
          The Transactions types.
 
Constructor Summary
TransactionInfo(int type, int status, Transaction trasaction, long lease, long startTime, int numberOfLockedObjects)
          Constructor.
 
Method Summary
 boolean equals(Object obj)
           
 long getLease()
          Returns the lease of the transaction.
 int getNumberOfLockedObjects()
           
 long getStartTime()
           
 int getStatus()
          Returns the transaction status.
 Transaction getTrasaction()
          Returns the transaction that own the info.
 Object getTxnId()
           
 int getType()
          Returns the type.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionInfo

public TransactionInfo(int type,
                       int status,
                       Transaction trasaction,
                       long lease,
                       long startTime,
                       int numberOfLockedObjects)
Constructor.

Parameters:
type - from TransactionInfo.Types (LOCAL, JINI, XA or ALL)
status - can be one of the status defined in TransactionConstants
trasaction - the transaction that own this info
lease - the transaction lease
startTime - when the Transaction started
numberOfLockedObjects -
Method Detail

getStatus

public int getStatus()
Returns the transaction status.

Returns:
transaction status.

getTrasaction

public Transaction getTrasaction()
Returns the transaction that own the info.

Returns:
the transaction.

getType

public int getType()
Returns the type. From TransactionInfo.Types

Returns:
Transaction type.

getLease

public long getLease()
Returns the lease of the transaction. in case of JINI Txn return -1

Returns:
transaction lease.

getNumberOfLockedObjects

public int getNumberOfLockedObjects()
Returns:
number of objects locked by Transaction

getStartTime

public long getStartTime()
Returns:
the time the Transaction started

getTxnId

public Object getTxnId()
Returns:
the Transaction ID

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object