IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid
Interface TxID

All Superinterfaces:
Serializable

public interface TxID
extends Serializable

This interface is an opaque identifier for a transaction. Context information can be stored and retrieved in multiple slots on this object. This mechanism allows a TransactionCallback and Loader, for example, to share state information with each other in the context of a specific session transaction.

The TxID.toString() output can be used to determine whether the originating Session transaction is a single partition transaction or a multi-partition transaction. If the String output begins with the keyword Local then this indicates a single partition transaction, for example: Local-40000139-72B2-C037-E000-1C271366B073

If the String output begins with the keyword WXS then this indicates a multi-partition transaction, for example: WXS-40000139-72B2-BD3A-E000-1C271366B073

Since:
WAS XD 6.0, XC10
See Also:
Loader, ObjectGrid.reserveSlot(String), Session, TransactionCallback

Field Summary
static String SLOT_NAME
          All slots should be reserved using this name.
 
Method Summary
 boolean equals(TxID o)
          Checks for equality between two TxID objects.
 Session getSession()
          Returns the Session that owns this TxID.
 Object getSlot(int slotNumber)
          Gets the context information currently associated with this transaction.
 int hashCode()
          Returns the hashcode of the Tx identifier.
 void putSlot(int slotNumber, Object o)
          Sets some context information to be associated with this transaction.
 

Field Detail

SLOT_NAME

static final String SLOT_NAME
All slots should be reserved using this name.

See Also:
ObjectGrid.reserveSlot(String), Constant Field Values
Method Detail

equals

boolean equals(TxID o)
Checks for equality between two TxID objects.

Parameters:
o - Input TxID to check for equality against
Returns:
true, if they are equal; false, if they not equal

hashCode

int hashCode()
Returns the hashcode of the Tx identifier.

Overrides:
hashCode in class Object
Returns:
hashcode

getSlot

Object getSlot(int slotNumber)
Gets the context information currently associated with this transaction.

Parameters:
slotNumber - the slot number for the context information being requested
Returns:
Object the current context information for the slot number
See Also:
putSlot(int, Object), ObjectGrid.reserveSlot(String)

putSlot

void putSlot(int slotNumber,
             Object o)
Sets some context information to be associated with this transaction.

Parameters:
slotNumber - the slot number
o - Object to be put into the TxID slot
See Also:
getSlot(int), ObjectGrid.reserveSlot(String)

getSession

Session getSession()
Returns the Session that owns this TxID.

Returns:
a Session object to use.
See Also:
Session

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

© Copyright International Business Machines Corp 2005,2012. All rights reserved.