Top Description Fields Constructors Methods
net.sf.ehcache.transaction

public Class XidTransactionIDSerializedForm

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
net.sf.ehcache.CacheManager, net.sf.ehcache.transaction.xa.SerializableXid, javax.transaction.xa.Xid, java.io.Serializable

A replacement serialized form for XID transaction IDs. It can be used by transaction ID factories to create XID-based IDs that serialize to this form (using writeReplace()) if they don't want or cannot provide directly serializable IDs.

During deserialization, objects of this class will be replaced by the result of the CacheManager.restoreXidTransactionID() call.

Author
Ludovic Orban

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final String
private final Xid

Constructor Summary

AccessConstructor and Description
public
XidTransactionIDSerializedForm(String
the name of the cache manager which contains the factory that created the original XidTransactionID
cacheManagerName
,
String
the name of the cache for this id
cacheName
,
String ownerID, Xid
the XidTransactionID's XID
xid
)

Constructor

Method Summary

Modifier and TypeMethod and Description
private static CacheManager
getCacheManager(String cacheManagerName)

Basically does the same as CacheManager.getCache() except that this method is lock free.

public String

Returns:

the cache manager name
getCacheManagerName
()

Get the name of the cache manager which contains the factory that created the original XidTransactionID

public String

Returns:

the cache name
getCacheName
()

Get the name of the cache which this original XidTransactionID is for.

public String

Returns:

the original XidTransactionID's owner id
getOwnerID
()

Get the original XidTransactionID's owner id

public Xid

Returns:

the original XidTransactionID's XID
getXid
()

Get the original XidTransactionID's XID

private Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheManagerNameback to summary
private final String cacheManagerName
cacheNameback to summary
private final String cacheName
ownerIDback to summary
private final String ownerID
xidback to summary
private final Xid xid

Constructor Detail

XidTransactionIDSerializedFormback to summary
public XidTransactionIDSerializedForm(String cacheManagerName, String cacheName, String ownerID, Xid xid)

Constructor

Parameters
cacheManagerName:String

the name of the cache manager which contains the factory that created the original XidTransactionID

cacheName:String

the name of the cache for this id

xid:Xid

the XidTransactionID's XID

Method Detail

getCacheManagerback to summary
private static CacheManager getCacheManager(String cacheManagerName)

Basically does the same as CacheManager.getCache() except that this method is lock free.

getCacheManagerNameback to summary
public String getCacheManagerName()

Get the name of the cache manager which contains the factory that created the original XidTransactionID

Returns:String

the cache manager name

getCacheNameback to summary
public String getCacheName()

Get the name of the cache which this original XidTransactionID is for.

Returns:String

the cache name

getOwnerIDback to summary
public String getOwnerID()

Get the original XidTransactionID's owner id

Returns:String

the original XidTransactionID's owner id

getXidback to summary
public Xid getXid()

Get the original XidTransactionID's XID

Returns:Xid

the original XidTransactionID's XID

readResolveback to summary
private Object readResolve()