|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.arjuna.ats.arjuna.coordinator.ActionHierarchy
Class that represents the transaction hierarchy. This class can cope with transaction hierarchies of arbitrary depth.
Field Summary | |
static int |
DEFAULT_HIERARCHY_DEPTH
|
Constructor Summary | |
ActionHierarchy(ActionHierarchy theCopy)
Create a new copy of the specified transaction hierarchy. |
|
ActionHierarchy(int depth)
Create a new (blank) hierarchy with sufficient space for the specified number of transactions. |
Method Summary | |
boolean |
add(Uid actionId)
Insert new entry growing table as needed. |
boolean |
add(Uid actionId,
int at)
Add the transaction id at the specified level. |
void |
copy(ActionHierarchy c)
Create a copy of the specified transaction hierarchy. |
int |
depth()
Returns the current depth of the hierarchy. |
boolean |
equals(ActionHierarchy other)
Overloads Object.equals. |
void |
finalize()
|
int |
findCommonPrefix(ActionHierarchy oldHierarchy)
Find common prefix in two hierarchies. |
void |
forgetDeepest()
Remove the deepest nested transaction from the hierarchy. |
com.arjuna.ats.arjuna.coordinator.ActionInfo |
getActionInfo(int typeIndex)
|
Uid |
getActionUid(int typeIndex)
|
Uid |
getDeepestActionUid()
Returns the transaction id of the most deeply nested transaction. |
boolean |
isAncestor(Uid target)
Scan hierarchy looking for a particular Uid starting at deepest and going up. |
void |
pack(OutputBuffer state)
Pack the hierarchy into the buffer. |
void |
print(java.io.PrintWriter strm)
Print out the transaction hierarchy. |
void |
unpack(InputBuffer state)
CAREFULLY unpack the 'new' hierarchy. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEFAULT_HIERARCHY_DEPTH
Constructor Detail |
public ActionHierarchy(int depth)
public ActionHierarchy(ActionHierarchy theCopy)
Method Detail |
public void finalize()
public void print(java.io.PrintWriter strm)
public void copy(ActionHierarchy c)
public final boolean equals(ActionHierarchy other)
public final boolean add(Uid actionId)
true
if successful, false
otherwise.public final boolean add(Uid actionId, int at)
true
if successful, false
otherwise.public final boolean isAncestor(Uid target)
true
if is ancestor, false
otherwise.public void pack(OutputBuffer state) throws java.io.IOException
java.io.IOException
public void unpack(InputBuffer state) throws java.io.IOException
java.io.IOException
public final void forgetDeepest()
public final int findCommonPrefix(ActionHierarchy oldHierarchy)
public final int depth()
public final Uid getDeepestActionUid()
Uid
of the deepest transaction.public final Uid getActionUid(int typeIndex)
public final com.arjuna.ats.arjuna.coordinator.ActionInfo getActionInfo(int typeIndex)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |