| java.lang.Object org.jgroups.blocks.Xid
Xid | public class Xid implements Externalizable(Code) | | 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
ReplicationReceiver.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.
author: Bela Ban. version: $Revision: 1.5 $ version: Revisions: version: Dec 28 2002 Bela Ban: first implementation |
Field Summary | |
final public static int | DIRTY_READS Writes are serialized, but reads can be dirty; e.g., a data might have
been changed while we read it. | final public static int | READ_COMMITTED Reads are dirty until another transaction actually commits; at that
points the modified data will be reflected here. | final public 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. | final public static int | SERIALIZABLE Reads and writes require locks. | final public static String | XID | protected Address | creator | protected long | id | protected int | mode | protected static transient long | next_id |
Constructor Summary | |
public | Xid() |
DIRTY_READS | final public static int DIRTY_READS(Code) | | Writes are serialized, but reads can be dirty; e.g., a data might have
been changed while we read it. This is fast because we don't need to
acquire locks for reads.
|
READ_COMMITTED | final public static int READ_COMMITTED(Code) | | Reads are dirty until another transaction actually commits; at that
points the modified data will be reflected here.
|
REPEATABLE_READ | final public static int REPEATABLE_READ(Code) | | Each read causes the data read to be copied to the private workspace, so
subsequent reads always read the private data.
|
SERIALIZABLE | final public static int SERIALIZABLE(Code) | | Reads and writes require locks. This is very costly, and is not
recommended (and currently not implemented either :-)).
|
next_id | protected static transient long next_id(Code) | | |
getId | public long getId()(Code) | | |
getMode | public long getMode()(Code) | | |
hashCode | public int hashCode()(Code) | | |
|
|