|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.blocks.Xid
Distributed transaction ID modeled after the JTA spec. This is used to
identify entities of work, with which resources are associated. A transaction
will thus trigger the creation of an associated entry on each receiver, which
keeps track of resources acquired and their locks, operations to be committed
in case ReplicatioReceiver#commit(Xid)
is called
A transaction is identified by its creator and a transaction ID. The creator
is currently a JGroups address,
consisting of the IP address and port of the member.
Note that this class might be replaced in the future with the real
JTA counterpart.
Revisions:
Dec 28 2002 Bela Ban: first implementation
Field Summary | |
protected Address |
creator
|
static int |
DIRTY_READS
Writes are serialized, but reads can be dirty, e.g. |
protected long |
id
|
protected int |
mode
|
protected static long |
next_id
|
static int |
READ_COMMITTED
Reads are dirty until another transaction actually commits; at that points the modified data will be reflected here. |
static int |
REPEATABLE_READ
Each read causes the data read to be copied to the private workspace, so subsequent reads always read the private data. |
static int |
SERIALIZABLE
Reads and writes require locks. |
static java.lang.String |
XID
|
Constructor Summary | |
Xid()
|
Method Summary | |
int |
compareTo(java.lang.Object o)
|
static Xid |
create(Address creator)
|
static Xid |
create(Address creator,
int mode)
|
boolean |
equals(java.lang.Object other)
|
Address |
getCreator()
|
long |
getId()
|
long |
getMode()
|
int |
hashCode()
|
static java.lang.String |
modeToString(int m)
|
void |
readExternal(java.io.ObjectInput in)
|
java.lang.String |
toString()
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Address creator
protected long id
protected int mode
protected static transient long next_id
public static final java.lang.String XID
public static final int DIRTY_READS
public static final int READ_COMMITTED
public static final int REPEATABLE_READ
public static final int SERIALIZABLE
Constructor Detail |
public Xid()
Method Detail |
public Address getCreator()
public long getId()
public long getMode()
public static Xid create(Address creator) throws java.lang.Exception
java.lang.Exception
public static Xid create(Address creator, int mode) throws java.lang.Exception
java.lang.Exception
public static java.lang.String modeToString(int m)
public boolean equals(java.lang.Object other)
public int hashCode()
public int compareTo(java.lang.Object o)
public java.lang.String toString()
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |