|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.jboss.mx.util.JBossNotificationBroadcasterSupport
|
+--org.jboss.system.ServiceMBeanSupport
|
+--org.jboss.cache.TreeCache
A tree-like structure that is replicated across several members. Updates will
be multicast to all group members reliably and in the same order. User has the
option to set transaction isolation level now (e.g., SERIALIZABLE, or
REPEATABLE_READ.
| Field Summary | |
protected java.util.Set |
activationChangeNodes
Set of Fqns of nodes that are currently being processed by activateReqion or inactivateRegion. |
static java.lang.reflect.Method |
addChildMethodLocal
|
protected CacheLoader |
cache_loader
A reference to the CacheLoader. |
protected boolean |
cache_loader_asynchronous
specifies whether the cache loader needs to be wrapped in the AsyncCacheLoader decorator |
protected java.lang.String |
cache_loader_class
The fully qualified name of the CacheLoader (has to implement the CacheLoader interface) |
protected java.util.Properties |
cache_loader_config
The properties from which to configure the CacheLoader |
protected boolean |
cache_loader_fetch_persistent_state
Fetches the entire persistent state from the underlying CacheLoader. |
protected boolean |
cache_loader_fetch_transient_state
Fetches the transient state. |
protected boolean |
cache_loader_passivate
Will the cache loader passivate on eviction or persist? |
protected java.util.List |
cache_loader_preload
List |
protected boolean |
cache_loader_shared
Are the CacheLoaders sharing the same resource or not ? |
protected int |
cache_mode
|
protected org.jgroups.JChannel |
channel
|
protected java.lang.String |
cluster_name
|
protected java.lang.String |
cluster_props
|
static java.lang.reflect.Method |
commitMethod
|
protected boolean |
coordinator
Am I the coordinator ? |
protected boolean |
deadlockDetection
|
static short |
DEFAULT_REPLICATION_VERSION
|
protected org.jgroups.blocks.RpcDispatcher |
disp
|
static java.lang.reflect.Method |
enqueueMethodCallMethod
|
protected org.w3c.dom.Element |
evictConfig_
Eviction policy configuration in xml Element |
protected java.lang.String |
eviction_policy_class
|
protected TreeCacheListener |
eviction_policy_provider
|
static java.lang.reflect.Method |
evictNodeMethodLocal
|
protected boolean |
fetch_state_on_startup
|
static java.lang.reflect.Method |
getChildrenNamesMethodLocal
|
static java.lang.reflect.Method |
getKeysMethodLocal
|
static java.lang.reflect.Method |
getKeyValueMethodLocal
|
static java.lang.reflect.Method |
getNodeMethodLocal
|
static java.lang.reflect.Method |
getPartialStateMethod
|
protected boolean |
inactiveOnStartup
|
protected Interceptor |
interceptor_chain
invokeMethod(MethodCall) will dispatch to this chain of interceptors. |
protected IsolationLevel |
isolationLevel
|
protected boolean |
isStateSet
|
static int |
LOCAL
Entries in the cache are by default local; ie. |
protected long |
lock_acquisition_timeout
|
static java.lang.reflect.Method |
lockMethodLocal
|
protected static org.apache.commons.logging.Log |
log
|
protected TreeCacheMarshaller |
marshaller_
Marshaller if register to handle marshalling |
protected java.util.Vector |
members
|
protected org.jgroups.MessageListener |
ml
|
protected boolean |
nodeLockingOptimistic
Determines whether to use optimistic locking or not. |
static java.lang.reflect.Method |
notifyCallOnInactiveMethod
|
static java.lang.reflect.Method |
optimisticPrepareMethod
|
static java.lang.reflect.Method |
prepareMethod
|
static java.lang.reflect.Method |
printMethodLocal
|
static java.lang.reflect.Method |
putDataEraseMethodLocal
|
static java.lang.reflect.Method |
putDataMethodLocal
|
static java.lang.reflect.Method |
putFailFastKeyValueMethodLocal
|
static java.lang.reflect.Method |
putKeyValMethodLocal
|
protected java.util.Map |
region_msg_queues
|
protected RegionManager |
regionManager_
RegionManager used by marshaller and ExtendedCacheLoader |
static java.lang.reflect.Method |
releaseAllLocksMethodLocal
|
static java.lang.reflect.Method |
removeDataMethodLocal
|
static java.lang.reflect.Method |
removeKeyMethodLocal
|
static java.lang.reflect.Method |
removeNodeMethodLocal
|
static int |
REPL_ASYNC
Entries in the cache are by default replicated (asynchronously) |
protected ReplicationQueue |
repl_queue
Queue used to replicate updates when mode is repl-async |
protected long |
repl_queue_interval
|
protected int |
repl_queue_max_elements
|
static int |
REPL_SYNC
Entries in the cache are by default replicated (synchronously) |
static java.lang.reflect.Method |
replicateAllMethod
|
static java.lang.reflect.Method |
replicateMethod
|
protected Replicatable |
replication_handler
Interceptor which handles invocations of _replicate(MethodCall). |
static java.lang.reflect.Method |
rollbackMethod
|
protected DataNode |
root
|
static java.lang.String |
SEPARATOR
|
protected java.lang.Exception |
setStateException
|
protected long |
state_fetch_timeout
|
protected boolean |
sync_commit_phase
synchronous or asynchrous commit phase ? |
protected long |
sync_repl_timeout
|
protected boolean |
sync_rollback_phase
synchronous or asynchrous rollback phase ? |
protected javax.transaction.TransactionManager |
tm
Used to get the Transaction associated with the current thread |
protected TransactionManagerLookup |
tm_lookup
Method to acquire a TransactionManager. |
protected java.lang.String |
tm_lookup_class
Class of the implementation of TransactionManagerLookup |
static java.lang.String |
UNINITIALIZED
|
protected boolean |
use_repl_queue
|
protected boolean |
useCreateService
|
protected boolean |
useMarshalling_
Check to see if we need to use marshalling |
| Fields inherited from class org.jboss.system.ServiceMBeanSupport |
server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
| Constructor Summary | |
TreeCache()
|
|
TreeCache(org.jgroups.JChannel channel)
Expects an already connected channel. |
|
TreeCache(java.lang.String cluster_name,
java.lang.String props,
long state_fetch_timeout)
Creates a channel with the given properties. |
|
| Method Summary | |
void |
_addChild(GlobalTransaction tx,
Fqn parent_fqn,
java.lang.Object child_name,
DataNode old_node)
Compensating method to _remove(GlobalTransaction,Fqn,boolean). |
protected void |
_createService()
|
void |
_enqueueMethodCall(java.lang.String subtree,
org.jgroups.blocks.MethodCall call)
|
void |
_evict(Fqn fqn)
Called by eviction policy provider. |
protected void |
_evictSubtree(Fqn subtree)
Evicts the node at subtree along with all descendant nodes. |
Node |
_get(Fqn fqn)
|
java.lang.Object |
_get(Fqn fqn,
java.lang.Object key,
boolean sendNodeEvent)
|
java.util.Set |
_getChildrenNames(Fqn fqn)
|
java.util.Set |
_getKeys(Fqn fqn)
|
byte[] |
_getState(Fqn fqn,
long timeout,
boolean force,
boolean suppressErrors)
Returns the state for the portion of the tree named by fqn. |
void |
_lock(Fqn fqn,
int lock_type,
boolean recursive)
|
java.lang.String |
_print(Fqn fqn)
|
void |
_put(GlobalTransaction tx,
Fqn fqn,
java.util.Map data,
boolean create_undo_ops)
Does the real work. |
void |
_put(GlobalTransaction tx,
Fqn fqn,
java.util.Map data,
boolean create_undo_ops,
boolean erase_contents)
Does the real work. |
java.lang.Object |
_put(GlobalTransaction tx,
Fqn fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops)
|
java.lang.Object |
_put(GlobalTransaction tx,
Fqn fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops,
long timeout)
|
void |
_put(GlobalTransaction tx,
java.lang.String fqn,
java.util.Map data,
boolean create_undo_ops)
Does the real work. |
java.lang.Object |
_put(GlobalTransaction tx,
java.lang.String fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops)
|
void |
_releaseAllLocks(Fqn fqn)
|
void |
_remove(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops)
|
void |
_remove(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent)
|
void |
_remove(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent,
boolean eviction)
Remove a node |
java.lang.Object |
_remove(GlobalTransaction tx,
Fqn fqn,
java.lang.Object key,
boolean create_undo_ops)
|
void |
_remove(GlobalTransaction tx,
java.lang.String fqn,
boolean create_undo_ops)
|
java.lang.Object |
_remove(GlobalTransaction tx,
java.lang.String fqn,
java.lang.Object key,
boolean create_undo_ops)
|
void |
_removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops)
|
void |
_removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent)
|
void |
_removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent,
boolean eviction)
|
void |
_removeData(GlobalTransaction tx,
java.lang.String fqn,
boolean create_undo_ops)
|
void |
_replicate(java.util.List method_calls)
|
java.lang.Object |
_replicate(org.jgroups.blocks.MethodCall method_call)
Invoked by the ReplicationInterceptor of other nodes in the cluster, to replicate their changes across the cluster. |
protected void |
acquireLocksForStateTransfer(DataNode root,
java.lang.Object lockOwner,
long timeout,
boolean lockChildren,
boolean force)
|
void |
activateRegion(java.lang.String subtreeFqn)
Causes the cache to transfer state for the subtree rooted at subtreeFqn and to begin accepting replication messages
for that subtree. |
void |
addNode(GlobalTransaction gtx,
Fqn node)
|
void |
addTreeCacheListener(TreeCacheListener listener)
|
void |
block()
Block sending and receiving of messages until viewAccepted() is called |
protected void |
cacheLoaderPreload()
|
java.util.List |
callRemoteMethods(java.util.Vector mbrs,
org.jgroups.blocks.MethodCall method_call,
boolean synchronous,
boolean exclude_self,
long timeout)
|
java.util.List |
callRemoteMethods(java.util.Vector members,
java.lang.reflect.Method method,
java.lang.Object[] args,
boolean synchronous,
boolean exclude_self,
long timeout)
|
java.util.List |
callRemoteMethods(java.util.Vector members,
java.lang.String method_name,
java.lang.Class[] types,
java.lang.Object[] args,
boolean synchronous,
boolean exclude_self,
long timeout)
|
void |
commit(GlobalTransaction tx)
|
protected void |
createCacheLoader()
Creates an instance of a CacheLoader if and only if The CacheLoader has not yet been created cache_loader_class is set The CacheLoader is shared and we are not the coordinator (only the coordinator is supposed to have a CacheLoader) |
protected void |
createInterceptorChain()
|
void |
createService()
Lifecycle method. |
protected DataNode |
createSubtreeRootNode(Fqn subtree)
|
void |
destroyService()
Lifecycle mthod. |
protected boolean |
determineCoordinator()
|
java.lang.String |
dumpTransactionTable()
Dumps the contents of the TransactionTable |
void |
evict(Fqn fqn)
Called by eviction policy provider. |
boolean |
exists(Fqn fqn)
Checks whether a given node exists in the tree. |
boolean |
exists(Fqn fqn,
java.lang.Object key)
Checks whether a given key exists in the given node. |
boolean |
exists(java.lang.String fqn)
Checks whether a given node exists in the tree |
boolean |
exists(java.lang.String fqn,
java.lang.Object key)
|
void |
fetchState(long timeout)
Fetch the group state from the current coordinator. |
protected void |
fetchStateOnStartup()
|
Node |
get(Fqn fqn)
|
java.lang.Object |
get(Fqn fqn,
java.lang.Object key)
Finds a node given its name and returns the value associated with a given key in its data
map. |
protected java.lang.Object |
get(Fqn fqn,
java.lang.Object key,
boolean sendNodeEvent)
|
Node |
get(java.lang.String fqn)
|
java.lang.Object |
get(java.lang.String fqn,
java.lang.Object key)
Finds a node given its name and returns the value associated with a given key in its data
map. |
CacheLoader |
getCacheLoader()
|
boolean |
getCacheLoaderAsynchronous()
|
java.lang.String |
getCacheLoaderClass()
|
java.util.Properties |
getCacheLoaderConfig()
|
boolean |
getCacheLoaderFetchPersistentState()
|
boolean |
getCacheLoaderFetchTransientState()
|
boolean |
getCacheLoaderPassivation()
|
java.lang.String |
getCacheLoaderPreload()
|
boolean |
getCacheLoaderShared()
|
java.lang.String |
getCacheMode()
Returns the current caching mode. |
int |
getCacheModeInternal()
|
java.util.Set |
getChildrenNames(Fqn fqn)
Returns all children of a given node |
java.util.Set |
getChildrenNames(java.lang.String fqn)
Returns all children of a given node |
java.lang.String |
getClusterName()
Get the name of the replication group |
java.lang.String |
getClusterProperties()
Get the cluster properties (e.g. |
org.jgroups.Address |
getCoordinator()
|
GlobalTransaction |
getCurrentTransaction()
Get the transaction associated with the current thread and maps it onto a GlobalTransaction. |
GlobalTransaction |
getCurrentTransaction(javax.transaction.Transaction tx)
|
boolean |
getDeadlockDetection()
|
protected java.lang.String |
getDefaultProperties()
|
java.lang.String |
getEvictionPolicyClass()
Returns the name of the cache eviction policy (must be an implementation of EvictionPolicy) |
org.w3c.dom.Element |
getEvictionPolicyConfig()
|
int |
getEvictionThreadWakeupIntervalSeconds()
Obtain eviction thread (if any) wake up interval in seconds |
boolean |
getFetchStateOnStartup()
Returns whether or not on startup to acquire the initial state from existing members. |
long |
getInitialStateRetrievalTimeout()
Get the max time to wait until the initial state is retrieved. |
TreeCache |
getInstance()
|
java.lang.String |
getInterceptorChain()
|
java.util.List |
getInterceptors()
|
java.lang.String |
getIsolationLevel()
Returns the transaction isolation level. |
IsolationLevel |
getIsolationLevelClass()
|
java.util.Set |
getKeys(Fqn fqn)
|
java.util.Set |
getKeys(java.lang.String fqn)
|
java.lang.Object |
getLocalAddress()
|
protected javax.transaction.Transaction |
getLocalTransaction()
Returns the transaction associated with the current thread. |
long |
getLockAcquisitionTimeout()
Default max time to wait for a lock. |
java.util.Map |
getLockTable()
|
java.util.Vector |
getMembers()
|
org.jgroups.MessageListener |
getMessageListener()
|
java.lang.String |
getNodeLockingScheme()
|
int |
getNumberOfAttributes()
Returns an approximation of the total number of attributes in the tree. |
int |
getNumberOfLocksHeld()
Gets the number of read or write locks held across the entire tree |
int |
getNumberOfNodes()
Returns an approximation of the total number of nodes in the tree. |
protected java.lang.Object |
getOwnerForLock()
Returns an object suitable for use in node locking, either the current transaction or the current thread if there is no transaction. |
Replicatable |
getReplicationHandler()
|
java.lang.String |
getReplicationVersion()
Gets the format version of the data transferred during an initial state transfer or a call to activateRegion(String). |
short |
getReplicationVersionShort()
|
ReplicationQueue |
getReplQueue()
|
long |
getReplQueueInterval()
|
int |
getReplQueueMaxElements()
|
DataNode |
getRoot()
Used by interceptors. |
byte[] |
getStateBytes()
|
short |
getStateTransferVersion()
Gets the format version of the data transferred during an initial state transfer or a call to activateRegion(String). |
boolean |
getSyncCommitPhase()
|
long |
getSyncReplTimeout()
Returns the default max timeout after which synchronous replication calls return. |
boolean |
getSyncRollbackPhase()
|
javax.transaction.TransactionManager |
getTransactionManager()
|
java.lang.String |
getTransactionManagerLookupClass()
|
TransactionTable |
getTransactionTable()
|
java.util.Map |
getTreeCacheListeners()
Returns a Map contains the listeners to this tree cache |
boolean |
getUseMarshalling()
Gets whether a TreeCacheMarshaller instance should be used
to manage different classloaders to use for unmarshalling replicated
objects. |
boolean |
getUseReplQueue()
|
java.lang.String |
getVersion()
|
boolean |
hasChild(Fqn fqn)
|
void |
inactivateRegion(java.lang.String subtreeFqn)
Causes the cache to stop accepting replication events for the subtree rooted at subtreeFqn and evict all nodes in that subtree. |
protected java.lang.Object |
invokeMethod(org.jgroups.blocks.MethodCall m)
Invokes a method against this object. |
boolean |
isCoordinator()
|
static boolean |
isCrudMethod(java.lang.reflect.Method m)
|
boolean |
isInactiveOnStartup()
Gets whether the entire tree is inactive upon startup, only responding to replication messages after activateRegion(String) is
called to activate one or more parts of the tree. |
boolean |
isNodeLockingOptimistic()
returns whether node locking is optimistic. |
void |
load(java.lang.String fqn)
Loads the indicated Fqn, plus all parents recursively from the CacheLoader. |
protected java.lang.Class |
loadClass(java.lang.String classname)
Loads the specified class using this class's classloader, or, if it is null
(i.e. |
protected void |
notifyAllNodesCreated(DataNode curr)
Generates NodeAdded notifications for all nodes of the tree. |
protected void |
notifyCacheStarted()
|
protected void |
notifyCacheStopped()
|
void |
notifyCallForInactiveSubtree(java.lang.String fqn)
Method provided to JGroups by TreeCacheMarshaller.objectFromByteBuffer(byte[]) when
it receives a replication event for an Fqn that has been marked
as inactive. |
void |
notifyNodeActivate(Fqn fqn,
boolean pre)
|
void |
notifyNodeCreated(Fqn fqn)
|
protected void |
notifyNodeEvict(Fqn fqn,
boolean pre)
|
protected void |
notifyNodeEvicted(Fqn fqn)
|
void |
notifyNodeLoaded(Fqn fqn)
|
protected void |
notifyNodeModified(Fqn fqn)
|
protected void |
notifyNodeModify(Fqn fqn,
boolean pre)
|
void |
notifyNodePassivate(Fqn fqn,
boolean pre)
|
protected void |
notifyNodeRemove(Fqn fqn,
boolean pre)
|
protected void |
notifyNodeRemoved(Fqn fqn)
|
protected void |
notifyNodeVisited(Fqn fqn)
|
protected void |
notifyViewChange(org.jgroups.View v)
|
void |
optimisticPrepare(GlobalTransaction gtx,
java.util.List modifications,
java.util.Map data,
org.jgroups.Address address,
boolean bool)
|
DataNode |
peek(Fqn fqn)
|
java.lang.Object |
peek(Fqn fqn,
java.lang.Object key)
Like get() method but without triggering a node visit event. |
void |
prepare(GlobalTransaction global_tx,
java.util.List modifications,
org.jgroups.Address coord,
boolean commit)
|
java.lang.String |
print(Fqn fqn)
Prints a representation of the node defined by fqn. |
java.lang.String |
print(java.lang.String fqn)
Prints a representation of the node defined by fqn. |
java.lang.String |
printDetails()
|
java.lang.String |
printLockInfo()
|
void |
put(Fqn fqn,
java.util.Map data)
Adds a new node to the tree and sets its data. |
java.lang.Object |
put(Fqn fqn,
java.lang.Object key,
java.lang.Object value)
Adds a key and value to a given node. |
void |
put(java.lang.String fqn,
java.util.Map data)
Adds a new node to the tree and sets its data. |
java.lang.Object |
put(java.lang.String fqn,
java.lang.Object key,
java.lang.Object value)
Adds a key and value to a given node. |
java.lang.Object |
putFailFast(Fqn fqn,
java.lang.Object key,
java.lang.Object value,
long timeout)
Deprecated. This is a kludge created specifically form the Hibernate 3.0 release. This method should not be used by any application. The methodV will likely be removed in a future release |
java.lang.Object |
putFailFast(java.lang.String fqn,
java.lang.Object key,
java.lang.Object value,
long timeout)
Deprecated. |
void |
registerClassLoader(java.lang.String fqn,
java.lang.ClassLoader cl)
If useMarshalling is true, we will use TreeCacheMarshaller for marshalling. |
void |
releaseAllLocks(Fqn fqn)
Force-releases all locks in this node and the entire subtree |
void |
releaseAllLocks(java.lang.String fqn)
Force-releases all locks in this node and the entire subtree |
protected void |
releaseStateTransferLocks(DataNode root,
java.lang.Object lockOwner,
boolean childrenLocked)
|
void |
remove(Fqn fqn)
Removes the node from the tree. |
java.lang.Object |
remove(Fqn fqn,
java.lang.Object key)
Removes key from the node's hashmap |
void |
remove(java.lang.String fqn)
Removes the node from the tree. |
java.lang.Object |
remove(java.lang.String fqn,
java.lang.Object key)
Removes key from the node's hashmap |
void |
removeData(Fqn fqn)
|
void |
removeData(java.lang.String fqn)
|
void |
removeTreeCacheListener(TreeCacheListener listener)
|
void |
rollback(GlobalTransaction tx)
|
void |
setCacheLoader(CacheLoader cache_loader)
|
void |
setCacheLoaderAsynchronous(boolean b)
|
void |
setCacheLoaderClass(java.lang.String cache_loader_class)
|
void |
setCacheLoaderConfig(java.util.Properties cache_loader_config)
|
void |
setCacheLoaderFetchPersistentState(boolean flag)
|
void |
setCacheLoaderFetchTransientState(boolean flag)
|
void |
setCacheLoaderPassivation(boolean passivate)
|
void |
setCacheLoaderPreload(java.lang.String list)
|
void |
setCacheLoaderShared(boolean shared)
|
void |
setCacheMode(int mode)
Sets the default cache mode. |
void |
setCacheMode(java.lang.String mode)
Sets the default caching mode) |
void |
setClusterConfig(org.w3c.dom.Element config)
Convert a list of elements to the JG property string |
void |
setClusterName(java.lang.String name)
Set the name of the replication group |
void |
setClusterProperties(java.lang.String cluster_props)
Set the cluster properties. |
void |
setDeadlockDetection(boolean dt)
|
void |
setEvictionPolicyClass(java.lang.String eviction_policy_class)
Sets the classname of the eviction policy |
void |
setEvictionPolicyConfig(org.w3c.dom.Element config)
Setup eviction policy configuration |
void |
setFetchStateOnStartup(boolean flag)
Sets whether or not on startup to acquire the initial state from existing members. |
void |
setInactiveOnStartup(boolean inactiveOnStartup)
Sets whether the entire tree is inactive upon startup, only responding to replication messages after activateRegion(String) is
called to activage one or more parts of the tree. |
void |
setInitialStateRetrievalTimeout(long timeout)
Set the initial state transfer timeout (see getInitialStateRetrievalTimeout()) |
void |
setInterceptorChain(Interceptor i)
Used for unit tests only - to force interceptor chains. |
void |
setIsolationLevel(IsolationLevel level)
|
void |
setIsolationLevel(java.lang.String level)
Set the transaction isolation level. |
void |
setLockAcquisitionTimeout(long timeout)
Set the max time for lock acquisition. |
protected void |
setNodeLockingOptimistic(boolean b)
Sets whether to use optimistic locking on the nodes. |
void |
setNodeLockingScheme(java.lang.String s)
|
void |
setReplicationHandler(Replicatable handler)
|
void |
setReplicationVersion(java.lang.String versionString)
Sets the format version of the data transferred during an initial state transfer or a call to activateRegion(String). |
void |
setReplQueueInterval(long interval)
|
void |
setReplQueueMaxElements(int max_elements)
|
void |
setStateBytes(byte[] state)
|
void |
setStateTransferVersion(short version)
Sets the format version of the data transferred during an initial state transfer or a call to activateRegion(String). |
void |
setSyncCommitPhase(boolean sync_commit_phase)
|
void |
setSyncReplTimeout(long timeout)
Sets the default maximum wait time for synchronous replication to receive all results |
void |
setSyncRollbackPhase(boolean sync_rollback_phase)
|
void |
setTransactionManagerLookup(TransactionManagerLookup l)
Sets the TransactionManagerLookup object |
void |
setTransactionManagerLookupClass(java.lang.String cl)
Sets the class of the TransactionManagerLookup impl. |
void |
setUseMarshalling(boolean isTrue)
Sets whether a TreeCacheMarshaller instance should be created
to manage different classloaders to use for unmarshalling replicated
objects. |
void |
setUseReplQueue(boolean flag)
|
void |
startService()
Lifecyle method. |
void |
stopService()
Lifecycle method. |
protected int |
string2Mode(java.lang.String mode)
|
void |
suspect(org.jgroups.Address suspected_mbr)
Called when a member is suspected |
java.lang.String |
toString()
|
java.lang.String |
toString(boolean details)
|
void |
unregisterClassLoader(java.lang.String fqn)
If useMarshalling is true, we will use unregister this region. |
void |
viewAccepted(org.jgroups.View new_view)
|
| Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, destroy, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
| Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
| Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
| Field Detail |
public static final short DEFAULT_REPLICATION_VERSION
protected DataNode root
protected org.jgroups.JChannel channel
protected boolean coordinator
protected static final org.apache.commons.logging.Log log
protected java.lang.String cluster_name
protected java.lang.String cluster_props
protected final java.util.Vector members
protected org.jgroups.blocks.RpcDispatcher disp
protected org.jgroups.MessageListener ml
protected long state_fetch_timeout
protected long sync_repl_timeout
protected boolean use_repl_queue
protected int repl_queue_max_elements
protected long repl_queue_interval
protected java.util.Map region_msg_queues
protected boolean fetch_state_on_startup
protected long lock_acquisition_timeout
protected java.lang.String eviction_policy_class
protected TreeCacheListener eviction_policy_provider
protected int cache_mode
protected boolean inactiveOnStartup
public static java.lang.reflect.Method putDataMethodLocal
public static java.lang.reflect.Method putDataEraseMethodLocal
public static java.lang.reflect.Method putKeyValMethodLocal
public static java.lang.reflect.Method putFailFastKeyValueMethodLocal
public static java.lang.reflect.Method removeNodeMethodLocal
public static java.lang.reflect.Method removeKeyMethodLocal
public static java.lang.reflect.Method removeDataMethodLocal
public static java.lang.reflect.Method evictNodeMethodLocal
public static java.lang.reflect.Method prepareMethod
public static java.lang.reflect.Method commitMethod
public static java.lang.reflect.Method rollbackMethod
public static java.lang.reflect.Method replicateMethod
public static java.lang.reflect.Method replicateAllMethod
public static java.lang.reflect.Method addChildMethodLocal
public static java.lang.reflect.Method getKeyValueMethodLocal
public static java.lang.reflect.Method getNodeMethodLocal
public static java.lang.reflect.Method getKeysMethodLocal
public static java.lang.reflect.Method getChildrenNamesMethodLocal
public static java.lang.reflect.Method releaseAllLocksMethodLocal
public static java.lang.reflect.Method printMethodLocal
public static java.lang.reflect.Method lockMethodLocal
public static java.lang.reflect.Method optimisticPrepareMethod
public static java.lang.reflect.Method getPartialStateMethod
public static java.lang.reflect.Method enqueueMethodCallMethod
public static java.lang.reflect.Method notifyCallOnInactiveMethod
protected boolean isStateSet
protected java.lang.Exception setStateException
protected IsolationLevel isolationLevel
protected org.w3c.dom.Element evictConfig_
protected boolean useMarshalling_
protected TreeCacheMarshaller marshaller_
protected RegionManager regionManager_
protected Interceptor interceptor_chain
invokeMethod(MethodCall) will dispatch to this chain of interceptors.
In the future, this will be replaced with JBossAop. This is a first step towards refactoring JBossCache.
protected Replicatable replication_handler
_replicate(MethodCall). Any such method
invocation is forwarded to the invoke_handler.
protected TransactionManagerLookup tm_lookup
ServiceMBeanSupport.start()
protected java.lang.String tm_lookup_class
protected javax.transaction.TransactionManager tm
protected java.lang.String cache_loader_class
protected CacheLoader cache_loader
protected java.util.Properties cache_loader_config
protected boolean cache_loader_shared
protected boolean cache_loader_passivate
protected java.util.List cache_loader_preload
protected boolean cache_loader_fetch_transient_state
protected boolean cache_loader_fetch_persistent_state
protected boolean cache_loader_asynchronous
protected boolean sync_commit_phase
protected boolean sync_rollback_phase
protected boolean deadlockDetection
protected ReplicationQueue repl_queue
public static final java.lang.String SEPARATOR
public static final int LOCAL
public static final int REPL_ASYNC
public static final int REPL_SYNC
public static final java.lang.String UNINITIALIZED
protected boolean nodeLockingOptimistic
protected boolean useCreateService
protected java.util.Set activationChangeNodes
| Constructor Detail |
public TreeCache(java.lang.String cluster_name,
java.lang.String props,
long state_fetch_timeout)
throws java.lang.Exception
public TreeCache()
throws java.lang.Exception
public TreeCache(org.jgroups.JChannel channel)
throws java.lang.Exception
| Method Detail |
public org.jgroups.MessageListener getMessageListener()
public static boolean isCrudMethod(java.lang.reflect.Method m)
public java.lang.String getVersion()
getVersion in interface TreeCacheMBeanpublic DataNode getRoot()
public java.lang.Object getLocalAddress()
getLocalAddress in interface TreeCacheMBeanpublic java.util.Vector getMembers()
getMembers in interface TreeCacheMBeanpublic boolean isCoordinator()
isCoordinator in interface TreeCacheMBeanpublic java.lang.String getClusterName()
getClusterName in interface TreeCacheMBeanpublic void setClusterName(java.lang.String name)
setClusterName in interface TreeCacheMBeanpublic java.lang.String getClusterProperties()
getClusterProperties in interface TreeCacheMBeanpublic void setClusterProperties(java.lang.String cluster_props)
setClusterProperties in interface TreeCacheMBeancluster_props - The properties for the cluster (JGroups)public TransactionTable getTransactionTable()
public java.util.Map getLockTable()
public java.lang.String dumpTransactionTable()
dumpTransactionTable in interface TreeCacheMBeanpublic boolean getDeadlockDetection()
getDeadlockDetection in interface TreeCacheMBeanpublic void setDeadlockDetection(boolean dt)
setDeadlockDetection in interface TreeCacheMBeandt - public java.lang.String getInterceptorChain()
getInterceptorChain in interface TreeCacheMBeanpublic void setInterceptorChain(Interceptor i)
i - public java.util.List getInterceptors()
getInterceptors in interface TreeCacheMBeanpublic java.lang.String getCacheLoaderClass()
getCacheLoaderClass in interface TreeCacheMBeanpublic void setCacheLoaderClass(java.lang.String cache_loader_class)
setCacheLoaderClass in interface TreeCacheMBeancache_loader_class - public java.util.Properties getCacheLoaderConfig()
getCacheLoaderConfig in interface TreeCacheMBeanpublic void setCacheLoaderConfig(java.util.Properties cache_loader_config)
setCacheLoaderConfig in interface TreeCacheMBeancache_loader_config - public CacheLoader getCacheLoader()
getCacheLoader in interface TreeCacheMBeanpublic void setCacheLoader(CacheLoader cache_loader)
setCacheLoader in interface TreeCacheMBeancache_loader - public boolean getCacheLoaderShared()
getCacheLoaderShared in interface TreeCacheMBeanpublic void setCacheLoaderShared(boolean shared)
setCacheLoaderShared in interface TreeCacheMBeanshared - public boolean getCacheLoaderPassivation()
getCacheLoaderPassivation in interface TreeCacheMBeanpublic void setCacheLoaderPassivation(boolean passivate)
setCacheLoaderPassivation in interface TreeCacheMBeanpassivate - public void setCacheLoaderPreload(java.lang.String list)
setCacheLoaderPreload in interface TreeCacheMBeanlist - public boolean getCacheLoaderAsynchronous()
getCacheLoaderAsynchronous in interface TreeCacheMBeanpublic void setCacheLoaderAsynchronous(boolean b)
setCacheLoaderAsynchronous in interface TreeCacheMBeanpublic java.lang.String getCacheLoaderPreload()
getCacheLoaderPreload in interface TreeCacheMBeanpublic void setCacheLoaderFetchPersistentState(boolean flag)
setCacheLoaderFetchPersistentState in interface TreeCacheMBeanflag - public boolean getCacheLoaderFetchPersistentState()
getCacheLoaderFetchPersistentState in interface TreeCacheMBeanpublic void setCacheLoaderFetchTransientState(boolean flag)
setCacheLoaderFetchTransientState in interface TreeCacheMBeanflag - public boolean getCacheLoaderFetchTransientState()
getCacheLoaderFetchTransientState in interface TreeCacheMBeanpublic boolean isInactiveOnStartup()
activateRegion(String) is
called to activate one or more parts of the tree.
This property is only relevant if getUseMarshalling() is
true.
isInactiveOnStartup in interface TreeCacheMBeanpublic void setInactiveOnStartup(boolean inactiveOnStartup)
activateRegion(String) is
called to activage one or more parts of the tree.
This property is only relevant if getUseMarshalling() is
true.
setInactiveOnStartup in interface TreeCacheMBeanpublic boolean getSyncCommitPhase()
getSyncCommitPhase in interface TreeCacheMBeanpublic void setSyncCommitPhase(boolean sync_commit_phase)
setSyncCommitPhase in interface TreeCacheMBeansync_commit_phase - public boolean getSyncRollbackPhase()
getSyncRollbackPhase in interface TreeCacheMBeanpublic void setSyncRollbackPhase(boolean sync_rollback_phase)
setSyncRollbackPhase in interface TreeCacheMBeansync_rollback_phase - public void setEvictionPolicyConfig(org.w3c.dom.Element config)
setEvictionPolicyConfig in interface TreeCacheMBeanpublic org.w3c.dom.Element getEvictionPolicyConfig()
public void setClusterConfig(org.w3c.dom.Element config)
setClusterConfig in interface TreeCacheMBeanpublic long getInitialStateRetrievalTimeout()
getInitialStateRetrievalTimeout in interface TreeCacheMBeanpublic void setInitialStateRetrievalTimeout(long timeout)
getInitialStateRetrievalTimeout())
setInitialStateRetrievalTimeout in interface TreeCacheMBeanpublic java.lang.String getCacheMode()
getCacheMode in interface TreeCacheMBeanpublic int getCacheModeInternal()
public void setNodeLockingScheme(java.lang.String s)
setNodeLockingScheme in interface TreeCacheMBeanpublic java.lang.String getNodeLockingScheme()
getNodeLockingScheme in interface TreeCacheMBeanprotected void setNodeLockingOptimistic(boolean b)
public boolean isNodeLockingOptimistic()
public void setCacheMode(java.lang.String mode)
throws java.lang.Exception
setCacheMode in interface TreeCacheMBeanjava.lang.Exceptionpublic void setCacheMode(int mode)
mode - public long getSyncReplTimeout()
getSyncReplTimeout in interface TreeCacheMBeanpublic void setSyncReplTimeout(long timeout)
setSyncReplTimeout in interface TreeCacheMBeanpublic boolean getUseReplQueue()
getUseReplQueue in interface TreeCacheMBeanpublic void setUseReplQueue(boolean flag)
setUseReplQueue in interface TreeCacheMBeanflag - public long getReplQueueInterval()
getReplQueueInterval in interface TreeCacheMBeanpublic void setReplQueueInterval(long interval)
setReplQueueInterval in interface TreeCacheMBeaninterval - public int getReplQueueMaxElements()
getReplQueueMaxElements in interface TreeCacheMBeanpublic void setReplQueueMaxElements(int max_elements)
setReplQueueMaxElements in interface TreeCacheMBeanmax_elements - public ReplicationQueue getReplQueue()
public java.lang.String getIsolationLevel()
getIsolationLevel in interface TreeCacheMBeanpublic void setIsolationLevel(java.lang.String level)
setIsolationLevel in interface TreeCacheMBeanpublic void setIsolationLevel(IsolationLevel level)
level - public IsolationLevel getIsolationLevelClass()
public boolean getFetchStateOnStartup()
TreeCacheMBean
getFetchStateOnStartup in interface TreeCacheMBeanpublic void setFetchStateOnStartup(boolean flag)
TreeCacheMBean
setFetchStateOnStartup in interface TreeCacheMBeanflag - public long getLockAcquisitionTimeout()
getLockAcquisitionTimeout in interface TreeCacheMBeanpublic void setLockAcquisitionTimeout(long timeout)
setLockAcquisitionTimeout in interface TreeCacheMBeantimeout - public java.lang.String getEvictionPolicyClass()
getEvictionPolicyClass in interface TreeCacheMBeanpublic void setEvictionPolicyClass(java.lang.String eviction_policy_class)
setEvictionPolicyClass in interface TreeCacheMBeanpublic int getEvictionThreadWakeupIntervalSeconds()
getEvictionThreadWakeupIntervalSeconds in interface TreeCacheMBeanpublic void setTransactionManagerLookup(TransactionManagerLookup l)
setTransactionManagerLookup in interface TreeCacheMBeanl - public java.lang.String getTransactionManagerLookupClass()
getTransactionManagerLookupClass in interface TreeCacheMBean
public void setTransactionManagerLookupClass(java.lang.String cl)
throws java.lang.Exception
setTransactionManagerLookupClass in interface TreeCacheMBeancl -
java.lang.Exceptionpublic javax.transaction.TransactionManager getTransactionManager()
getTransactionManager in interface TreeCacheMBeanpublic TreeCache getInstance()
getInstance in interface TreeCacheMBeanpublic void setReplicationHandler(Replicatable handler)
public Replicatable getReplicationHandler()
public void fetchState(long timeout)
throws org.jgroups.ChannelClosedException,
org.jgroups.ChannelNotConnectedException
fetchState in interface TreeCacheMBeanorg.jgroups.ChannelClosedException
org.jgroups.ChannelNotConnectedExceptionpublic void addTreeCacheListener(TreeCacheListener listener)
addTreeCacheListener in interface TreeCacheMBeanlistener - public void removeTreeCacheListener(TreeCacheListener listener)
removeTreeCacheListener in interface TreeCacheMBeanlistener - public java.util.Map getTreeCacheListeners()
public void createService()
throws java.lang.Exception
create
createService in interface TreeCacheMBeancreateService in class org.jboss.system.ServiceMBeanSupportjava.lang.Exception
protected void _createService()
throws java.lang.Exception
java.lang.Exception
public void startService()
throws java.lang.Exception
start
startService in interface TreeCacheMBeanstartService in class org.jboss.system.ServiceMBeanSupportjava.lang.Exceptionpublic void destroyService()
destroyService in interface TreeCacheMBeandestroyService in class org.jboss.system.ServiceMBeanSupportpublic void stopService()
stop.
stopService in interface TreeCacheMBeanstopService in class org.jboss.system.ServiceMBeanSupport
protected void createInterceptorChain()
throws java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.ClassNotFoundException
protected void createCacheLoader()
throws java.lang.Exception
java.lang.Exception
protected void cacheLoaderPreload()
throws java.lang.Exception
java.lang.Exceptionpublic void setUseMarshalling(boolean isTrue)
TreeCacheMBeanTreeCacheMarshaller instance should be created
to manage different classloaders to use for unmarshalling replicated
objects.
This property must be set to true before any call to
TreeCacheMBean.registerClassLoader(String, ClassLoader) or
TreeCacheMBean.activateRegion(String)
setUseMarshalling in interface TreeCacheMBeanpublic boolean getUseMarshalling()
TreeCacheMBeanTreeCacheMarshaller instance should be used
to manage different classloaders to use for unmarshalling replicated
objects.
getUseMarshalling in interface TreeCacheMBean
public void load(java.lang.String fqn)
throws java.lang.Exception
load in interface TreeCacheMBeanfqn -
java.lang.Exceptionprotected boolean determineCoordinator()
public org.jgroups.Address getCoordinator()
public byte[] getStateBytes()
public void setStateBytes(byte[] state)
public void registerClassLoader(java.lang.String fqn,
java.lang.ClassLoader cl)
throws RegionNameConflictException
useMarshalling is true, we will use TreeCacheMarshaller for marshalling.
User will register the specific class loader through this api.
registerClassLoader in interface TreeCacheMBeanfqn - The fqn region. Children of this fqn will use this classloader for (un)marshalling.cl - The class loader to use
RegionNameConflictException - If there is a conflict in fqn specification.
public void unregisterClassLoader(java.lang.String fqn)
throws RegionNotFoundException
useMarshalling is true, we will use unregister this region.
unregisterClassLoader in interface TreeCacheMBeanfqn - The fqn region.
RegionNotFoundException - If there is a conflict in fqn specification.
public void activateRegion(java.lang.String subtreeFqn)
throws RegionNotEmptyException,
RegionNameConflictException,
CacheException
subtreeFqn and to begin accepting replication messages
for that subtree.
NOTE: This method will cause the creation of a node
in the local tree at subtreeFqn whether or not that
node exists anywhere else in the cluster. If the node does not exist
elsewhere, the local node will be empty. The creation of this node will
not be replicated.
activateRegion in interface TreeCacheMBeansubtreeFqn - Fqn string indicating the uppermost node in the
portion of the tree that should be activated.
RegionNotEmptyException - if the node subtreeFqn
exists and has either data or children
java.lang.IllegalStateException - if useMarshalling is false
RegionNameConflictException
CacheException
protected DataNode createSubtreeRootNode(Fqn subtree)
throws CacheException
CacheException
public void inactivateRegion(java.lang.String subtreeFqn)
throws RegionNameConflictException,
CacheException
subtreeFqn and evict all nodes in that subtree.
inactivateRegion in interface TreeCacheMBeansubtreeFqn - Fqn string indicating the uppermost node in the
portion of the tree that should be activated.
RegionNameConflictException - if subtreeFqn indicates
a node that is part of another
subtree that is being specially
managed (either by activate/inactiveRegion()
or by registerClassLoader())
CacheException - if there is a problem evicting nodes
java.lang.IllegalStateException - if useMarshalling is false
protected void _evictSubtree(Fqn subtree)
throws CacheException
subtree along with all descendant nodes.
subtree - Fqn indicating the uppermost node in the
portion of the tree that should be evicted.
CacheException
public void _enqueueMethodCall(java.lang.String subtree,
org.jgroups.blocks.MethodCall call)
throws java.lang.Throwable
java.lang.Throwable
public byte[] _getState(Fqn fqn,
long timeout,
boolean force,
boolean suppressErrors)
throws java.lang.Throwable
fqn.
State returned is a serialized byte[][], element 0 is the transient state (or null), and element 1 is the persistent state (or null).
fqn - Fqn indicating the uppermost node in the
portion of the tree whose state should be returned.timeout - max number of ms this method should wait to acquire
a read lock on the nodes being transferredforce - if a read lock cannot be acquired after
timeout ms, should the lock acquisition
be forced, and any existing transactions holding locks
on the nodes be rolled back? NOTE:
In release 1.2.4, this parameter has no effect.suppressErrors - should any Throwable thrown be suppressed?
java.lang.UnsupportedOperationException - if persistent state transfer is
enabled, the requested Fqn is not the root node, and the
cache loader does not implement ExtendedCacheLoader.
java.lang.Throwablepublic java.lang.String getReplicationVersion()
TreeCacheMBeanTreeCacheMBean.activateRegion(String). Different
releases of JBossCache may format this data differently; this property
identifies the format version being used by this cache instance.
The default value for this property is
DEFAULT_REPLICATION_VERSION.
getReplicationVersion in interface TreeCacheMBean124
for JBossCache 1.2.4public void setReplicationVersion(java.lang.String versionString)
TreeCacheMBeanTreeCacheMBean.activateRegion(String). Different
releases of JBossCache may format this data differently; this property
identifies the format version being used by this cache instance. Setting
this property to a value other than the default allows a cache instance
from a later release to interoperate with a cache instance from an
earlier release.
setReplicationVersion in interface TreeCacheMBeanversionString - a short identifying JBossCache release;
e.g. 124 for JBossCache 1.2.4public short getReplicationVersionShort()
public short getStateTransferVersion()
TreeCacheMBeanTreeCacheMBean.activateRegion(String). Different
releases of JBossCache may format this data differently; this property
identifies the format version being used by this cache instance.
The default value for this property is
DEFAULT_REPLICATION_VERSION.
getStateTransferVersion in interface TreeCacheMBean124
for JBossCache 1.2.4public void setStateTransferVersion(short version)
TreeCacheMBeanTreeCacheMBean.activateRegion(String). Different
releases of JBossCache may format this data differently; this property
identifies the format version being used by this cache instance. Setting
this property to a value other than the default allows a cache instance
from a later release to interoperate with a cache instance from an
earlier release.
setStateTransferVersion in interface TreeCacheMBeanversion - a short identifying JBossCache release;
e.g. 124 for JBossCache 1.2.4
protected void acquireLocksForStateTransfer(DataNode root,
java.lang.Object lockOwner,
long timeout,
boolean lockChildren,
boolean force)
throws java.lang.Exception
java.lang.Exception
protected void releaseStateTransferLocks(DataNode root,
java.lang.Object lockOwner,
boolean childrenLocked)
public void notifyCallForInactiveSubtree(java.lang.String fqn)
TreeCacheMarshaller.objectFromByteBuffer(byte[]) when
it receives a replication event for an Fqn that has been marked
as inactive. Currently a no-op.
#inactivate(Fqn)
protected void fetchStateOnStartup()
throws java.lang.Exception
java.lang.Exception
public Node get(java.lang.String fqn)
throws CacheException
get in interface TreeCacheMBeanfqn - fqn String name to retrieve from cache
CacheException
public Node get(Fqn fqn)
throws CacheException
get in interface TreeCacheMBeanfqn - fqn instance to retrieve from cache
CacheException
public Node _get(Fqn fqn)
throws CacheException
CacheException
public java.util.Set getKeys(java.lang.String fqn)
throws CacheException
getKeys in interface TreeCacheMBeanfqn -
CacheException
public java.util.Set getKeys(Fqn fqn)
throws CacheException
getKeys in interface TreeCacheMBeanfqn -
CacheException
public java.util.Set _getKeys(Fqn fqn)
throws CacheException
CacheException
public java.lang.Object get(java.lang.String fqn,
java.lang.Object key)
throws CacheException
data
map. Returns null if the node was not found in the tree or the key was not found in the hashmap.
get in interface TreeCacheMBeanfqn - The fully qualified name of the node.key - The key.
CacheException
public java.lang.Object get(Fqn fqn,
java.lang.Object key)
throws CacheException
data
map. Returns null if the node was not found in the tree or the key was not found in the hashmap.
get in interface TreeCacheMBeanfqn - The fully qualified name of the node.key - The key.
CacheException
public java.lang.Object _get(Fqn fqn,
java.lang.Object key,
boolean sendNodeEvent)
throws CacheException
CacheException
protected java.lang.Object get(Fqn fqn,
java.lang.Object key,
boolean sendNodeEvent)
throws CacheException
CacheException
public java.lang.Object peek(Fqn fqn,
java.lang.Object key)
throws CacheException
get() method but without triggering a node visit event. This is used
to prevent refresh of the cache data in the eviction policy.
fqn - key -
CacheExceptionpublic DataNode peek(Fqn fqn)
public boolean exists(java.lang.String fqn)
exists in interface TreeCacheMBeanfqn - The fully qualified name of the node
public boolean exists(Fqn fqn)
exists in interface TreeCacheMBeanfqn - The fully qualified name of the node
public boolean exists(java.lang.String fqn,
java.lang.Object key)
exists in interface TreeCacheMBeanfqn - key -
public boolean exists(Fqn fqn,
java.lang.Object key)
get(Fqn,Object)
exists in interface TreeCacheMBeanfqn - The fully qualified name of the nodekey -
public void put(java.lang.String fqn,
java.util.Map data)
throws CacheException
put in interface TreeCacheMBeanfqn - The fully qualified name of the new nodedata - The new data. May be null if no data should be set in the node.
CacheException
public void put(Fqn fqn,
java.util.Map data)
throws CacheException
put in interface TreeCacheMBeanfqn - The fully qualified name of the new nodedata - The new data. May be null if no data should be set in the node.
CacheException
public java.lang.Object put(java.lang.String fqn,
java.lang.Object key,
java.lang.Object value)
throws CacheException
put in interface TreeCacheMBeanfqn - The fully qualified name of the nodekey - The keyvalue - The value
CacheException
public java.lang.Object putFailFast(Fqn fqn,
java.lang.Object key,
java.lang.Object value,
long timeout)
throws CacheException
fqn - The fully qualified name of the nodekey - value - timeout - Number of milliseconds to wait until a lock has been acquired. A TimeoutException will
be thrown if not successful. 0 means to wait forever
CacheException
public java.lang.Object putFailFast(java.lang.String fqn,
java.lang.Object key,
java.lang.Object value,
long timeout)
throws CacheException
fqn - key - value - timeout -
CacheException
public java.lang.Object put(Fqn fqn,
java.lang.Object key,
java.lang.Object value)
throws CacheException
put in interface TreeCacheMBeanfqn - The fully qualified name of the nodekey - The keyvalue - The value
CacheException
public void remove(java.lang.String fqn)
throws CacheException
remove in interface TreeCacheMBeanfqn - The fully qualified name of the node.
CacheException
public void remove(Fqn fqn)
throws CacheException
remove in interface TreeCacheMBeanfqn - The fully qualified name of the node.
CacheException
public void evict(Fqn fqn)
throws CacheException
evict in interface TreeCacheMBeanfqn - Will remove everythign assoicated with this fqn.
CacheException
public java.lang.Object remove(java.lang.String fqn,
java.lang.Object key)
throws CacheException
key from the node's hashmap
remove in interface TreeCacheMBeanfqn - The fullly qualified name of the nodekey - The key to be removed
CacheException
public java.lang.Object remove(Fqn fqn,
java.lang.Object key)
throws CacheException
key from the node's hashmap
remove in interface TreeCacheMBeanfqn - The fullly qualified name of the nodekey - The key to be removed
CacheException
public void removeData(java.lang.String fqn)
throws CacheException
removeData in interface TreeCacheMBeanfqn -
CacheException
public void removeData(Fqn fqn)
throws CacheException
removeData in interface TreeCacheMBeanfqn -
CacheExceptionpublic void releaseAllLocks(java.lang.String fqn)
releaseAllLocks in interface TreeCacheMBeanfqn - public void releaseAllLocks(Fqn fqn)
releaseAllLocks in interface TreeCacheMBeanfqn - public java.lang.String print(java.lang.String fqn)
fqn.
Output includes name, fqn and data.
print in interface TreeCacheMBeanpublic java.lang.String print(Fqn fqn)
fqn.
Output includes name, fqn and data.
print in interface TreeCacheMBean
public java.util.Set getChildrenNames(java.lang.String fqn)
throws CacheException
getChildrenNames in interface TreeCacheMBeanfqn - The fully qualified name of the node
CacheException
public java.util.Set getChildrenNames(Fqn fqn)
throws CacheException
getChildrenNames in interface TreeCacheMBeanfqn - The fully qualified name of the node
CacheException
public java.util.Set _getChildrenNames(Fqn fqn)
throws CacheException
CacheExceptionpublic boolean hasChild(Fqn fqn)
public java.lang.String toString()
toString in interface TreeCacheMBeantoString in class java.lang.Objectpublic java.lang.String toString(boolean details)
public java.lang.String printDetails()
printDetails in interface TreeCacheMBeanpublic java.lang.String printLockInfo()
printLockInfo in interface TreeCacheMBeanpublic int getNumberOfLocksHeld()
getNumberOfLocksHeld in interface TreeCacheMBeanpublic int getNumberOfNodes()
getNumberOfNodes in interface TreeCacheMBeanpublic int getNumberOfAttributes()
getNumberOfAttributes in interface TreeCacheMBean
public java.util.List callRemoteMethods(java.util.Vector mbrs,
org.jgroups.blocks.MethodCall method_call,
boolean synchronous,
boolean exclude_self,
long timeout)
throws java.lang.Exception
java.lang.Exception
public java.util.List callRemoteMethods(java.util.Vector members,
java.lang.reflect.Method method,
java.lang.Object[] args,
boolean synchronous,
boolean exclude_self,
long timeout)
throws java.lang.Exception
callRemoteMethods in interface TreeCacheMBeanmembers - method - args - synchronous - exclude_self - timeout -
java.lang.Exception
public java.util.List callRemoteMethods(java.util.Vector members,
java.lang.String method_name,
java.lang.Class[] types,
java.lang.Object[] args,
boolean synchronous,
boolean exclude_self,
long timeout)
throws java.lang.Exception
callRemoteMethods in interface TreeCacheMBeanmembers - method_name - types - args - synchronous - exclude_self - timeout -
java.lang.Exception
public void _put(GlobalTransaction tx,
java.lang.String fqn,
java.util.Map data,
boolean create_undo_ops)
throws CacheException
TransactionEntry's lock list, (b) add nodes
that were created to TransactionEntry's node list and (c) create
Modifications and add them to TransactionEntry's modification
list and (d) create compensating modifications to undo the changes in case
of a rollback
_put in interface TreeCacheMBeanfqn - data - create_undo_ops - If true, undo operations will be created (default is true).
Otherwise they will not be created (used by rollback()).
CacheException
public void _put(GlobalTransaction tx,
Fqn fqn,
java.util.Map data,
boolean create_undo_ops)
throws CacheException
TransactionEntry's lock list, (b) add nodes
that were created to TransactionEntry's node list and (c) create
Modifications and add them to TransactionEntry's modification
list and (d) create compensating modifications to undo the changes in case
of a rollback
_put in interface TreeCacheMBeanfqn - data - create_undo_ops - If true, undo operations will be created (default is true).
Otherwise they will not be created (used by rollback()).
CacheException
public void _put(GlobalTransaction tx,
Fqn fqn,
java.util.Map data,
boolean create_undo_ops,
boolean erase_contents)
throws CacheException
TransactionEntry's lock list, (b) add nodes
that were created to TransactionEntry's node list and (c) create
Modifications and add them to TransactionEntry's modification
list and (d) create compensating modifications to undo the changes in case
of a rollback
_put in interface TreeCacheMBeanfqn - data - create_undo_ops - If true, undo operations will be created (default is true).erase_contents - Clear the existing hashmap before putting the new data into it
Otherwise they will not be created (used by rollback()).
CacheException
public java.lang.Object _put(GlobalTransaction tx,
java.lang.String fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops)
throws CacheException
_put in interface TreeCacheMBeanfqn - key - value -
CacheException
public java.lang.Object _put(GlobalTransaction tx,
Fqn fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops)
throws CacheException
_put in interface TreeCacheMBeanfqn - key - value -
CacheException
public java.lang.Object _put(GlobalTransaction tx,
Fqn fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops,
long timeout)
throws CacheException
CacheException
public void _remove(GlobalTransaction tx,
java.lang.String fqn,
boolean create_undo_ops)
throws CacheException
_remove in interface TreeCacheMBeanfqn -
CacheException
public void _remove(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops)
throws CacheException
_remove in interface TreeCacheMBeanfqn -
CacheException
public void _remove(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent)
throws CacheException
CacheException
public void _remove(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent,
boolean eviction)
throws CacheException
tx - fqn - create_undo_ops - sendNodeEvent -
CacheException
public java.lang.Object _remove(GlobalTransaction tx,
java.lang.String fqn,
java.lang.Object key,
boolean create_undo_ops)
throws CacheException
_remove in interface TreeCacheMBeanfqn - key -
CacheException
public java.lang.Object _remove(GlobalTransaction tx,
Fqn fqn,
java.lang.Object key,
boolean create_undo_ops)
throws CacheException
_remove in interface TreeCacheMBeanfqn - key -
CacheException
public void _removeData(GlobalTransaction tx,
java.lang.String fqn,
boolean create_undo_ops)
throws CacheException
fqn -
CacheException
public void _removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops)
throws CacheException
fqn -
CacheException
public void _removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent)
throws CacheException
CacheException
public void _removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent,
boolean eviction)
throws CacheException
CacheException
public void _evict(Fqn fqn)
throws CacheException
fqn - Will remove everything assoicated with this fqn.
CacheException
public void _addChild(GlobalTransaction tx,
Fqn parent_fqn,
java.lang.Object child_name,
DataNode old_node)
throws CacheException
_remove(GlobalTransaction,Fqn,boolean). This
is package-private on purpose because it is only supposed to be called inside
the same VM (by rollback(GlobalTransaction)).
parent_fqn - child_name - old_node -
CacheException
public java.lang.Object _replicate(org.jgroups.blocks.MethodCall method_call)
throws java.lang.Throwable
method_call -
java.lang.Throwable
public void _replicate(java.util.List method_calls)
throws java.lang.Throwable
java.lang.Throwablepublic void _releaseAllLocks(Fqn fqn)
public java.lang.String _print(Fqn fqn)
public void _lock(Fqn fqn,
int lock_type,
boolean recursive)
throws TimeoutException,
LockingException
TimeoutException
LockingException
public void optimisticPrepare(GlobalTransaction gtx,
java.util.List modifications,
java.util.Map data,
org.jgroups.Address address,
boolean bool)
public void prepare(GlobalTransaction global_tx,
java.util.List modifications,
org.jgroups.Address coord,
boolean commit)
public void commit(GlobalTransaction tx)
public void rollback(GlobalTransaction tx)
public void addNode(GlobalTransaction gtx,
Fqn node)
public void viewAccepted(org.jgroups.View new_view)
viewAccepted in interface org.jgroups.MembershipListenerpublic void suspect(org.jgroups.Address suspected_mbr)
suspect in interface org.jgroups.MembershipListenerpublic void block()
block in interface org.jgroups.MembershipListenerprotected javax.transaction.Transaction getLocalTransaction()
getCurrentTransaction()
public GlobalTransaction getCurrentTransaction()
GlobalTransaction. The mapping is maintained in the tx_map table.
If a local transaction exists, but doesn't yet have a mapping to a GlobalTransaction,
a new GlobalTransaction will be created and mapped to the local transaction.
Note that if a local transaction exists, but is not ACTIVE or PREPARING, null is returned too.
public GlobalTransaction getCurrentTransaction(javax.transaction.Transaction tx)
protected java.lang.Object invokeMethod(org.jgroups.blocks.MethodCall m)
throws CacheException
m -
CacheExceptionprotected java.lang.Object getOwnerForLock()
protected java.lang.Class loadClass(java.lang.String classname)
throws java.lang.ClassNotFoundException
null
(i.e. this class was loaded by the bootstrap classloader), the system classloader.
If loadtime instrumentation via GenerateInstrumentedClassLoader is used, this class may be loaded by the bootstrap classloader.
java.lang.ClassNotFoundExceptionpublic void notifyNodeCreated(Fqn fqn)
public void notifyNodeLoaded(Fqn fqn)
public void notifyNodeActivate(Fqn fqn,
boolean pre)
public void notifyNodePassivate(Fqn fqn,
boolean pre)
protected void notifyNodeRemove(Fqn fqn,
boolean pre)
protected void notifyNodeRemoved(Fqn fqn)
protected void notifyNodeEvict(Fqn fqn,
boolean pre)
protected void notifyNodeEvicted(Fqn fqn)
protected void notifyNodeModify(Fqn fqn,
boolean pre)
protected void notifyNodeModified(Fqn fqn)
protected void notifyNodeVisited(Fqn fqn)
protected void notifyCacheStarted()
protected void notifyCacheStopped()
protected void notifyViewChange(org.jgroups.View v)
protected void notifyAllNodesCreated(DataNode curr)
protected java.lang.String getDefaultProperties()
protected int string2Mode(java.lang.String mode)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||