public class XAAffinityContextHelper extends AbstractAffinityContextHelper
Modifier and Type | Field and Description |
---|---|
(package private) TransactionManager |
tm |
AFFINITY_CONTEXT_KEY_PREFIX
Constructor and Description |
---|
XAAffinityContextHelper() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAffinityContext(java.lang.String key)
Returns the affinity context object associated with the specified key.
|
java.lang.Object |
getAffinityContext(Transaction tx,
java.lang.String key) |
java.lang.String[] |
getKeys()
Returns a list of the set affinity context keys for this application context type,
or null if no contexts are set.
|
boolean |
isApplicationContextAvailable()
Returns true if the application context is available for this affinity
context type.
|
boolean |
setAffinityContext(java.lang.String key,
java.lang.Object context)
Sets the affinity context object on the application context under
the specified key.
|
boolean |
setAffinityContext(Transaction tx,
java.lang.String key,
java.lang.Object context) |
createAffinityContext, debug, getDatabaseName, getInstanceName, getKey, getKey, getServiceName
TransactionManager tm
public java.lang.String[] getKeys()
AffinityContextHelper
public boolean isApplicationContextAvailable()
AffinityContextHelper
public java.lang.Object getAffinityContext(java.lang.String key)
AffinityContextHelper
key
- The key of the affinity context objectpublic java.lang.Object getAffinityContext(Transaction tx, java.lang.String key)
public boolean setAffinityContext(java.lang.String key, java.lang.Object context)
AffinityContextHelper
key
- The key used to store the affinity context objectcontext
- The affinity context object to storepublic boolean setAffinityContext(Transaction tx, java.lang.String key, java.lang.Object context)