public class ActionHierarchy extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_HIERARCHY_DEPTH |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
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(PrintWriter strm)
Print out the transaction hierarchy.
|
void |
unpack(InputBuffer state)
CAREFULLY unpack the 'new' hierarchy.
|
public static final int DEFAULT_HIERARCHY_DEPTH
public ActionHierarchy(int depth)
public ActionHierarchy(ActionHierarchy theCopy)
public void print(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 IOException
IOException
public void unpack(InputBuffer state) throws IOException
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)
Copyright © 2017 JBoss by Red Hat. All rights reserved.