public class TransactionContext
extends java.lang.Object
| Constructor and Description |
|---|
TransactionContext() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clear()
Clear the DiSCo TransactionContext to revert to its default value, or a no-op if Agent not loaded
|
static int |
create()
Create a default UUID transaction ID
|
static void |
destroy()
Destroys the Transaction Context for this thread.
|
static java.lang.String |
get()
Get the DiSCo Transaction ID, or null if the agent is not loaded
|
static java.lang.Object |
getMetadata(java.lang.String key)
Get a value from the DiSCo metadata map, or null if the agent is not loaded
|
static java.util.Map<java.lang.String,java.lang.Object> |
getMetadataWithTag(java.lang.String tag)
Get data from the metadata map which contains the specified tag, or return null if the agent is not loaded
|
static java.lang.String |
getUninitializedTransactionContextValue()
Get the default uninitialized Transaction Context value
|
static boolean |
isWithinCreatedContext()
Test if we are currently considered to be inside a created Transaction Context or not.
|
static void |
putMetadata(java.lang.String key,
java.lang.Object value)
Set a value in the DiSCo metadata map, or do nothing if the agent is not loaded
|
static void |
removeMetadata(java.lang.String key)
Remove a value in the DiSCo metadata map, or do nothing if the agent is not loaded
|
static void |
set(java.lang.String value)
Set the DiSCo Transaction ID to a specific value.
|
static void |
setMetadataTag(java.lang.String key,
java.lang.String tag)
Set a tag on data from the metadata map with a tag, or do nothing if the agent is not loaded
|
public static int create()
public static void destroy()
public static void set(java.lang.String value)
value - - the value to setpublic static java.lang.String get()
public static void putMetadata(java.lang.String key,
java.lang.Object value)
key - the key of the metadatavalue - the metadata valuepublic static void removeMetadata(java.lang.String key)
key - the key of the metadatapublic static java.lang.Object getMetadata(java.lang.String key)
key - the key of the metadatapublic static void setMetadataTag(java.lang.String key,
java.lang.String tag)
key - a String to identify the data.tag - a String that will be added to label/tag the data.public static java.util.Map<java.lang.String,java.lang.Object> getMetadataWithTag(java.lang.String tag)
tag - a String to identify the metadata objects to be returned.public static void clear()
public static java.lang.String getUninitializedTransactionContextValue()
public static boolean isWithinCreatedContext()