public class FragmentBuilder extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FragmentBuilder.NodePlaceholder
This class provides information about a placeholder for
adding a child node to an existing parent.
|
static class |
FragmentBuilder.StateInformation
This class provides management of context to value state.
|
| Constructor and Description |
|---|
FragmentBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
addUncompletedCorrelationId(String id,
Node node,
int position)
This method associates a parent node and child position with a
correlation id.
|
protected int |
decrementThreadCount()
Decrement the thread count.
|
BusinessTransaction |
getBusinessTransaction() |
Node |
getCurrentNode()
This method returns the current node providing the scope
for further levels of detail.
|
byte[] |
getInData(int hashCode)
This method returns the data associated with the in
buffer and resets the buffer to be inactive.
|
Node |
getLatestNode(String nodeType,
boolean onStack)
This method returns the latest node of the specified type,
either on the stack, or on the 'popped' nodes.
|
ReportingLevel |
getLevel() |
protected Stack<Node> |
getNodeStack() |
byte[] |
getOutData(int hashCode)
This method returns the data associated with the out
buffer and resets the buffer to be inactive.
|
protected Stack<Node> |
getPoppedNodes() |
Object |
getState(Object context,
String name)
This method returns the state associated with the name and optional
context.
|
int |
getThreadCount() |
int |
getUncompletedCorrelationIdPosition(String id)
This method returns the child position associated with the
supplied correlation id.
|
Set<String> |
getUncompletedCorrelationIds()
This method returns the un-completed correlation ids.
|
void |
ignoreNode()
This method adds the current node to the list of 'ignored'
nodes.
|
protected int |
incrementThreadCount()
Increment the thread count.
|
void |
initInBuffer(int hashCode)
This method initialises the in data buffer.
|
void |
initOutBuffer(int hashCode)
This method initialises the out data buffer.
|
boolean |
isComplete()
This method determines if the fragment is complete.
|
boolean |
isCompleteExceptIgnoredNodes()
This method determines if the fragment is complete
with the exception of ignored nodes.
|
boolean |
isInBufferActive(int hashCode)
This method determines if the in data buffer is active.
|
boolean |
isOutBufferActive(int hashCode)
This method determines if the out data buffer is active.
|
boolean |
isSuppressed()
This method returns whether the fragment is in suppression
mode.
|
protected boolean |
nodeMatches(Node node,
Class<? extends Node> cls,
String uri)
This method determines whether the supplied node matches the specified class
and optional URI.
|
Node |
popNode(Class<? extends Node> cls,
String uri)
This method pops the latest node from the business transaction
fragment hierarchy.
|
protected Node |
popNode(Stack<Node> stack,
Class<? extends Node> cls,
String uri)
This method pops a node of the defined class and optional uri from the stack.
|
void |
pushNode(Node node)
This method pushes a new node into the business transaction
fragment hierarchy.
|
Node |
releaseNode(String id)
This method indicates that the identified node, for this thread of execution, should
be released.
|
Node |
removeUncompletedCorrelationId(String id)
This method removes the uncompleted correlation id and its
associated information.
|
void |
retainNode(String id)
This method indicates that the current node, for this thread of execution, should
be retained temporarily pending further changes.
|
Node |
retrieveNode(String id)
This method returns the node associated, for this thread of execution, identified
by the supplied id.
|
void |
setLevel(ReportingLevel level) |
void |
setState(Object context,
String name,
Object value)
This method stores state information associated with the name and optional
context.
|
void |
suppress()
This method initiates suppression of any child node.
|
String |
toString() |
void |
writeInData(int hashCode,
byte[] b,
int offset,
int len)
This method writes data to the in buffer.
|
void |
writeOutData(int hashCode,
byte[] b,
int offset,
int len)
This method writes data to the out buffer.
|
public boolean isComplete()
public boolean isCompleteExceptIgnoredNodes()
public BusinessTransaction getBusinessTransaction()
public ReportingLevel getLevel()
public void setLevel(ReportingLevel level)
level - the level to setpublic Node getCurrentNode()
public Node getLatestNode(String nodeType, boolean onStack)
nodeType - The node typeonStack - Whether from the stackpublic void pushNode(Node node)
node - The new nodepublic Node popNode(Class<? extends Node> cls, String uri)
cls - The type of node to popuri - The optional uri to matchprotected Node popNode(Stack<Node> stack, Class<? extends Node> cls, String uri)
stack - The stackcls - The node typeuri - The optional uri to matchprotected boolean nodeMatches(Node node, Class<? extends Node> cls, String uri)
node - The nodecls - The classuri - The optional URIpublic void retainNode(String id)
id - The identifier used to later on to identify the nodepublic Node releaseNode(String id)
id - The identifier used to identify the nodepublic Node retrieveNode(String id)
id - The identifier used to identify the nodepublic void addUncompletedCorrelationId(String id, Node node, int position)
id - The correlation idnode - The parent nodeposition - The child node position within the parent nodepublic Set<String> getUncompletedCorrelationIds()
public int getUncompletedCorrelationIdPosition(String id)
id - The correlation idpublic Node removeUncompletedCorrelationId(String id)
id - The correlation idpublic void suppress()
public boolean isSuppressed()
public void ignoreNode()
public void initInBuffer(int hashCode)
hashCode - The hash codepublic boolean isInBufferActive(int hashCode)
hashCode - The hash code, or -1 to ignore the hash codepublic void writeInData(int hashCode,
byte[] b,
int offset,
int len)
hashCode - The hash code, or -1 to ignore the hash codeb - The bytesoffset - The offsetlen - The lengthpublic byte[] getInData(int hashCode)
hashCode - The hash code, or -1 to ignore the hash codepublic void initOutBuffer(int hashCode)
hashCode - The hash codepublic boolean isOutBufferActive(int hashCode)
hashCode - The hash code, or -1 to ignore the hash codepublic void writeOutData(int hashCode,
byte[] b,
int offset,
int len)
hashCode - The hash code, or -1 to ignore the hash codeb - The bytesoffset - The offsetlen - The lengthpublic byte[] getOutData(int hashCode)
hashCode - The hash code, or -1 to ignore the hash codepublic void setState(Object context, String name, Object value)
context - The optional contextname - The namevalue - The valuepublic Object getState(Object context, String name)
context - The optional contextname - The namepublic int getThreadCount()
protected int incrementThreadCount()
protected int decrementThreadCount()
Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.