|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.cache.TreeCache
public class TreeCache
A tree-like structure that is replicated across several members. Updates are multicast to all group members reliably and in order. User has the option to set transaction isolation levels and other options.
| Field Summary | |
|---|---|
protected java.util.Set |
activationChangeNodes
Set of Fqns of nodes that are currently being processed by activateReqion or inactivateRegion. |
protected BuddyManager |
buddyManager
Buddy Manager |
protected org.w3c.dom.Element |
buddyReplicationConfig
Buddy replication configuration XML element |
protected int |
cache_mode
|
protected org.w3c.dom.Element |
cacheLoaderConfig
The XML Element from which to configure the CacheLoader |
protected CacheLoaderManager |
cacheLoaderManager
|
protected org.jgroups.JChannel |
channel
The JGroups JChannel in use. |
protected CacheLoaderConfig |
cloaderConfig
for legacy use * |
protected java.lang.String |
cluster_name
Default cluster name. |
protected java.lang.String |
cluster_props
Default cluster properties. |
protected boolean |
coordinator
True if this TreeCache is the coordinator. |
static short |
DEFAULT_REPLICATION_VERSION
Default replication version, from Version.getVersionShort(). |
protected org.jgroups.blocks.RpcDispatcher |
disp
JGroups RpcDispatcher in use. |
protected org.w3c.dom.Element |
evictConfig_
Eviction policy configuration in xml Element |
protected java.lang.String |
eviction_policy_class
|
protected EvictionPolicy |
eviction_policy_provider
Deprecated. DO NOT USE THIS. IT IS HERE FOR EJB3 COMPILATION COMPATIBILITY WITH JBOSSCACHE1.3 |
protected java.lang.String |
evictionInterceptorClass
|
protected RegionManager |
evictionRegionManager_
RegionManager used by cache eviction |
protected boolean |
fetchInMemoryState
|
protected boolean |
hasListeners
True if listeners are initialized. |
protected boolean |
inactiveOnStartup
|
protected Interceptor |
interceptor_chain
invokeMethod(MethodCall) will dispatch to this chain of interceptors. |
protected java.util.Set |
internalFqns
Set |
static int |
INVALIDATION_ASYNC
Cache sends evict(org.jboss.cache.Fqn) calls to remote caches when a node is changed. |
static int |
INVALIDATION_SYNC
Cache sends evict(org.jboss.cache.Fqn) calls to remote caches when a node is changed. |
protected IsolationLevel |
isolationLevel
Isolation level in use, default is IsolationLevel.REPEATABLE_READ. |
protected boolean |
isStandalone
|
protected boolean |
isStateSet
True if state was initialized during start-up. |
static int |
LOCAL
Entries in the cache are by default local and not replicated. |
protected long |
lock_acquisition_timeout
|
protected static org.apache.commons.logging.Log |
log
TreeCache log. |
protected VersionAwareMarshaller |
marshaller_
Marshaller if register to handle marshalling |
protected java.util.Vector |
members
List of cluster group members. |
protected org.jgroups.MessageListener |
ml
JGroups message listener. |
protected java.lang.String |
mux_serviceName
The JGroups multiplexer service name; null if the multiplexer isn't used |
protected java.lang.String |
mux_stackName
The JGroups multiplexer stack name, default is "fc-fast-minimalthreads" |
protected boolean |
nodeLockingOptimistic
Determines whether to use optimistic locking or not. |
protected RegionManager |
regionManager_
RegionManager used by marshaller and ExtendedCacheLoader |
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
Replicated element queue interval. |
protected int |
repl_queue_max_elements
Maximum number of replicated elements to queue. |
static int |
REPL_SYNC
Entries in the cache are by default replicated synchronously. |
protected DataNode |
root
Root DataNode. |
static java.lang.String |
SEPARATOR
Deprecated. use Fqn.SEPARATOR. |
protected java.lang.Exception |
setStateException
An exception occuring upon fetch state. |
protected long |
state_fetch_timeout
|
protected boolean |
sync_commit_phase
True if there is a synchronous commit phase, otherwise asynchronous commit. |
protected long |
sync_repl_timeout
|
protected boolean |
sync_rollback_phase
True if there is a synchronous rollback phase, otherwise asynchronous rollback. |
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
Uninitialized node key. |
protected boolean |
use_interceptor_mbeans
True if MBean interceptors are used. |
protected boolean |
use_repl_queue
True if replication is queued. |
protected boolean |
useCreateService
_createService was called. |
protected boolean |
useRegionBasedMarshalling
True if we use region based marshalling. |
protected boolean |
usingEviction
|
| 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()
Constructs an uninitialized TreeCache. |
|
TreeCache(org.jgroups.JChannel channel)
Constructs a TreeCache with an already connected channel. |
|
TreeCache(java.lang.String cluster_name,
java.lang.String props,
long state_fetch_timeout)
Creates a channel with the given cluster name, properties, and state fetch timeout. |
|
| Method Summary | |
|---|---|
void |
_addChild(GlobalTransaction tx,
Fqn parent_fqn,
java.lang.Object child_name,
DataNode old_node)
Compensating method to _remove(GlobalTransaction,Fqn,boolean). |
java.util.List |
_clusteredGet(org.jgroups.blocks.MethodCall methodCall,
java.lang.Boolean searchBackupSubtrees)
A 'clustered get' call, called from a remote ClusteredCacheLoader. |
protected void |
_createService()
|
void |
_dataGravitationCleanup(GlobalTransaction gtx,
Fqn primary,
Fqn backup)
|
void |
_enqueueMethodCall(java.lang.String subtree,
org.jgroups.blocks.MethodCall call)
Called internally to enqueue a method call. |
void |
_evict(Fqn fqn)
Internal evict method called by eviction policy provider. |
void |
_evict(Fqn fqn,
DataVersion version)
Internal evict method called by eviction policy provider. |
protected void |
_evictSubtree(Fqn subtree)
Evicts the node at subtree along with all descendant nodes. |
Node |
_get(Fqn fqn)
Returns the raw data of the node; called externally internally. |
java.lang.Object |
_get(Fqn fqn,
java.lang.Object key,
boolean sendNodeEvent)
|
protected byte[] |
_getAssociatedState(Fqn fqn,
long timeout,
boolean force)
Returns any state stored in the cache that needs to be propagated along with the normal transient state in a subtree when _getState(Fqn, long, boolean, boolean) is called for an Fqn. |
java.util.Set |
_getChildrenNames(Fqn fqn)
|
java.util.Map |
_getData(Fqn fqn)
Returns the raw data of the node; called externally internally. |
java.util.Set |
_getKeys(Fqn fqn)
|
byte[] |
_getState(Fqn fqn,
boolean fetchTransientState,
boolean fetchPersistentState,
long timeout,
boolean force,
boolean suppressErrors)
Returns the state for the portion of the tree named by fqn. |
byte[] |
_getState(Fqn fqn,
long timeout,
boolean force,
boolean suppressErrors)
Returns the state for the portion of the tree named by fqn. |
java.util.List |
_gravitateData(Fqn fqn,
boolean searchSubtrees,
boolean marshal)
Used with buddy replication's data gravitation interceptor |
void |
_loadState(Fqn subtreeRoot,
DataNode integrationRoot,
java.lang.Object[] sources,
java.lang.ClassLoader cl)
Requests state from each of the given source nodes in the cluster until it gets it or no node replies with a timeout exception. |
void |
_loadState(Fqn subtreeRoot,
Fqn integrationRoot,
java.lang.Object[] sources,
java.lang.ClassLoader cl)
Requests state from each of the given source nodes in the cluster until it gets it or no node replies with a timeout exception. |
void |
_lock(Fqn fqn,
int lock_type,
boolean recursive)
Should not be called. |
java.lang.String |
_print(Fqn fqn)
Finds and returns the org.jboss.cache.DataNode#toString() value for the Fqn. |
void |
_put(GlobalTransaction tx,
Fqn fqn,
java.util.Map data,
boolean create_undo_ops)
Internal put method. |
void |
_put(GlobalTransaction tx,
Fqn fqn,
java.util.Map data,
boolean create_undo_ops,
boolean erase_contents)
Internal put method. |
java.lang.Object |
_put(GlobalTransaction tx,
Fqn fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops)
Internal put method. |
java.lang.Object |
_put(GlobalTransaction tx,
Fqn fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops,
long timeout)
Internal put method. |
void |
_put(GlobalTransaction tx,
java.lang.String fqn,
java.util.Map data,
boolean create_undo_ops)
Internal put method. |
java.lang.Object |
_put(GlobalTransaction tx,
java.lang.String fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops)
Internal put method. |
void |
_releaseAllLocks(Fqn fqn)
Releases all locks for a FQN. |
void |
_remoteAnnounceBuddyPoolName(org.jgroups.stack.IpAddress address,
java.lang.String buddyPoolName)
|
void |
_remoteAssignToBuddyGroup(BuddyGroup group,
java.util.Map state)
Performs a search. |
void |
_remoteRemoveFromBuddyGroup(java.lang.String groupName)
|
void |
_remove(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops)
Internal remove method. |
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)
Internal method to remove a node. |
void |
_remove(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent,
boolean eviction,
DataVersion version)
Internal method to remove a node. |
java.lang.Object |
_remove(GlobalTransaction tx,
Fqn fqn,
java.lang.Object key,
boolean create_undo_ops)
Internal method to remove a key. |
void |
_remove(GlobalTransaction tx,
java.lang.String fqn,
boolean create_undo_ops)
Internal remove method. |
java.lang.Object |
_remove(GlobalTransaction tx,
java.lang.String fqn,
java.lang.Object key,
boolean create_undo_ops)
Internal method to remove a key. |
void |
_removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops)
Internal method to remove data from a node. |
void |
_removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent)
Internal method to remove data from a node. |
void |
_removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent,
boolean eviction)
Internal method to remove data from a node. |
void |
_removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent,
boolean eviction,
DataVersion version)
Internal method to remove data from a node. |
void |
_removeData(GlobalTransaction tx,
java.lang.String fqn,
boolean create_undo_ops)
Internal method to remove data from a node. |
void |
_replicate(java.util.List method_calls)
Replicates a list of method calls. |
java.lang.Object |
_replicate(org.jgroups.blocks.MethodCall method_call)
Replicates changes across to other nodes in the cluster. |
void |
_setState(byte[] new_state,
Fqn targetRoot,
java.lang.ClassLoader cl)
Set the portion of the cache rooted in targetRoot
to match the given state. |
protected void |
acquireLocksForStateTransfer(DataNode root,
java.lang.Object lockOwner,
long timeout,
boolean lockChildren,
boolean force)
Acquires locks on a root node for an owner for state transfer. |
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 |
addTreeCacheListener(TreeCacheListener listener)
Adds a tree cache listener. |
void |
addUndoOperation(GlobalTransaction gtx,
org.jgroups.blocks.MethodCall undo_op)
Adds an undo operatoin to the transaction table. |
void |
block()
Blocks sending and receiving of messages until viewAccepted() is called. |
java.util.List |
callRemoteMethods(java.util.List mbrs,
org.jgroups.blocks.MethodCall method_call,
boolean synchronous,
boolean exclude_self,
long timeout)
Deprecated. Note this is due to be moved to an interceptor. |
java.util.List |
callRemoteMethods(java.util.List mbrs,
org.jgroups.blocks.MethodCall method_call,
int mode,
boolean exclude_self,
long timeout)
Deprecated. Note this is due to be moved to an interceptor. |
java.util.List |
callRemoteMethods(java.util.List members,
java.lang.reflect.Method method,
java.lang.Object[] args,
boolean synchronous,
boolean exclude_self,
long timeout)
Deprecated. Note this is due to be moved to an interceptor. |
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)
Deprecated. Note this is due to be moved to an interceptor. |
void |
commit(GlobalTransaction tx)
Throws UnsupportedOperationException. |
protected void |
createEvictionPolicy()
|
void |
createService()
Lifecycle method. |
protected DataNode |
createSubtreeRootNode(Fqn subtree)
Creates a subtree in the local tree. |
void |
destroyService()
Unregisters the interceptor MBeans. |
protected boolean |
determineCoordinator()
Returns true if this TreeCache is the coordinator. |
java.lang.String |
dumpTransactionTable()
Returns the contents of the TransactionTable as a string. |
void |
evict(Fqn fqn)
Called by eviction policy provider. |
boolean |
exists(Fqn fqn)
Checks whether a given node exists in current in-memory state of 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 current in-memory state of the tree. |
boolean |
exists(java.lang.String fqn,
java.lang.Object key)
|
void |
fetchState(long timeout)
Fetches the group state from the current coordinator. |
protected void |
fetchStateOnStartup()
|
protected void |
forceAcquireLock(DataNode node,
java.lang.Object newOwner,
boolean lockChildren)
Forcibly acquire a read lock on the given node for the given owner, breaking any existing locks that prevent the read lock. |
Node |
get(Fqn fqn)
Returns a DataNode corresponding to the fully qualified name or null if does not exist. |
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)
|
java.lang.Object |
get(Fqn fqn,
java.lang.Object key,
boolean sendNodeEvent,
Option option)
The same as calling get(Fqn, Object, boolean) except apply options for this
specific method invocation. |
java.lang.Object |
get(Fqn fqn,
java.lang.Object key,
Option option)
The same as calling get(Fqn, Object) except that you can pass in options for this specific method invocation. |
DataNode |
get(Fqn fqn,
Option option)
The same as calling get(Fqn) except that you can pass in options for this specific method invocation. |
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. |
BuddyManager |
getBuddyManager()
Retrieves the Buddy Manager configured. |
org.w3c.dom.Element |
getBuddyReplicationConfig()
Retrieves the buddy replication cofiguration element |
CacheLoader |
getCacheLoader()
Returns the underlying cache loader in use. |
boolean |
getCacheLoaderAsynchronous()
Deprecated. |
java.lang.String |
getCacheLoaderClass()
Deprecated. |
java.util.Properties |
getCacheLoaderConfig()
Returns the properties in the cache loader configuration. |
org.w3c.dom.Element |
getCacheLoaderConfiguration()
Returns the cache loader configuration element. |
boolean |
getCacheLoaderFetchPersistentState()
Deprecated. |
boolean |
getCacheLoaderFetchTransientState()
Deprecated. |
CacheLoaderManager |
getCacheLoaderManager()
Returns the CacheLoaderManager. |
boolean |
getCacheLoaderPassivation()
Deprecated. |
java.lang.String |
getCacheLoaderPreload()
Deprecated. |
boolean |
getCacheLoaderShared()
Deprecated. |
java.lang.String |
getCacheMode()
Returns the current caching mode. |
int |
getCacheModeInternal()
Returns the internal caching mode as an integer. |
java.util.Set |
getChildrenNames(Fqn fqn)
Returns all children of a given node. |
java.util.Set |
getChildrenNames(Fqn fqn,
Option option)
The same as calling getChildrenNames(Fqn) except apply options for this
specific method invocation. |
java.util.Set |
getChildrenNames(java.lang.String fqn)
Returns all children of a given node. |
java.lang.String |
getClusterName()
Returns the name of the replication cluster group. |
java.lang.String |
getClusterProperties()
Returns the cluster properties as a String. |
org.jgroups.Address |
getCoordinator()
Returns the address of the coordinator or null if there is no coordinator. |
GlobalTransaction |
getCurrentTransaction()
Returns the transaction associated with the current thread. |
GlobalTransaction |
getCurrentTransaction(boolean createIfNotExists)
Returns the transaction associated with the thread; optionally creating it if is does not exist. |
GlobalTransaction |
getCurrentTransaction(javax.transaction.Transaction tx)
Returns the global transaction for this local transaction. |
GlobalTransaction |
getCurrentTransaction(javax.transaction.Transaction tx,
boolean createIfNotExists)
Returns the global transaction for this local transaction. |
boolean |
getDeadlockDetection()
Deprecated. |
protected java.lang.String |
getDefaultProperties()
Returns the default JGroup properties. |
java.lang.String |
getEvictionInterceptorClass()
|
java.lang.String |
getEvictionPolicyClass()
Returns the name of the cache eviction policy (must be an implementation of EvictionPolicy) |
org.w3c.dom.Element |
getEvictionPolicyConfig()
Returns the eviction policy configuration element. |
RegionManager |
getEvictionRegionManager()
Returns the eviction region manager for this TreeCache. |
int |
getEvictionThreadWakeupIntervalSeconds()
Obtain eviction thread (if any) wake up interval in seconds |
boolean |
getFetchInMemoryState()
Returns whether or not any initial state transfer or subsequent partial state transfer following an activateRegion call should
include in-memory state. |
boolean |
getFetchPersistentState()
Gets whether persistent state should be included in any state transfer. |
boolean |
getFetchStateOnStartup()
Returns whether or not on startup the initial state will be acquired from existing members. |
long |
getInitialStateRetrievalTimeout()
Returns the max time to wait until the initial state is retrieved. |
TreeCache |
getInstance()
Returns this. |
java.lang.String |
getInterceptorChain()
Returns the interceptor chain as a debug string. |
java.util.List |
getInterceptors()
Returns the list of interceptors. |
java.util.Set |
getInternalFqns()
Returns a Set |
InvocationContext |
getInvocationContext()
Retrieves the thread-local InvocationContext. |
java.lang.String |
getIsolationLevel()
Returns the transaction isolation level. |
IsolationLevel |
getIsolationLevelClass()
|
java.util.Set |
getKeys(Fqn fqn)
Returns a set of attribute keys for the Fqn. |
java.util.Set |
getKeys(java.lang.String fqn)
Returns a set of attribute keys for the Fqn. |
java.lang.Object |
getLocalAddress()
Returns the local channel address. |
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()
Returns the lock table. |
VersionAwareMarshaller |
getMarshaller()
|
java.util.Vector |
getMembers()
Returns the members as a Vector. |
org.jgroups.MessageListener |
getMessageListener()
Returns the MessageListener in use. |
java.lang.String |
getMultiplexerService()
Retrieves the JGroups multiplexer service name if defined. |
java.lang.String |
getMultiplexerStack()
Retrieves the JGroups multiplexer stack name if defined. |
java.lang.String |
getNodeLockingScheme()
Returns the node locking scheme as a string. |
int |
getNumberOfAttributes()
Returns an approximation of the total number of attributes in the tree. |
int |
getNumberOfAttributes(Fqn fqn)
Returns an approximation of the total number of attributes in this sub tree. |
int |
getNumberOfLocksHeld()
Returns 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. |
org.w3c.dom.Element |
getPojoCacheConfig()
|
RegionManager |
getRegionManager()
Returns the region manager for this TreeCache. |
java.lang.String |
getReplicationVersion()
Returns the replication version. |
short |
getReplicationVersionShort()
Returns the replication version as a short. |
ReplicationQueue |
getReplQueue()
Returns the replication queue. |
long |
getReplQueueInterval()
Returns the replication queue interval. |
int |
getReplQueueMaxElements()
Returns the replication queue max elements size. |
DataNode |
getRoot()
Used internally by interceptors. |
byte[] |
getStateBytes()
Returns the state bytes from the message listener. |
short |
getStateTransferVersion()
Deprecated. |
boolean |
getSyncCommitPhase()
Returns if sync commit phase is used. |
long |
getSyncReplTimeout()
Returns the default max timeout after which synchronous replication calls return. |
boolean |
getSyncRollbackPhase()
Returns if sync rollback phase is used. |
javax.transaction.TransactionManager |
getTransactionManager()
|
java.lang.String |
getTransactionManagerLookupClass()
|
TransactionTable |
getTransactionTable()
Returns the transaction table. |
java.util.Collection |
getTreeCacheListeners()
Returns a collection containing the listeners of this tree cache. |
boolean |
getUseInterceptorMbeans()
Returns true if interceptor MBeans are in use. |
boolean |
getUseMarshalling()
Deprecated. |
boolean |
getUseRegionBasedMarshalling()
Tests whether region based marshaling s used. |
boolean |
getUseReplQueue()
Returns true if the replication queue is being used. |
java.lang.String |
getVersion()
Returns the TreeCache implementation version. |
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()
Returns true if this is the group coordinator. |
boolean |
isInactiveOnStartup()
Returns 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 true if the node locking is optimistic. |
boolean |
isUsingEviction()
|
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)
Sends a notification that a node was activated. |
void |
notifyNodeCreated(Fqn fqn)
Sends a notification that a node was created. |
protected void |
notifyNodeEvict(Fqn fqn,
boolean pre)
|
protected void |
notifyNodeEvicted(Fqn fqn)
|
void |
notifyNodeLoaded(Fqn fqn)
Sends a notification that a node was loaded. |
protected void |
notifyNodeModified(Fqn fqn)
|
protected void |
notifyNodeModify(Fqn fqn,
boolean pre)
|
void |
notifyNodePassivate(Fqn fqn,
boolean pre)
Sends a notification that a node was passivated. |
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 onePhaseCommit)
Throws UnsupportedOperationException. |
DataNode |
peek(Fqn fqn)
Deprecated. This will go away. |
java.lang.Object |
peek(Fqn fqn,
java.lang.Object key)
Deprecated. This will go away. |
void |
prepare(GlobalTransaction global_tx,
java.util.List modifications,
org.jgroups.Address coord,
boolean onePhaseCommit)
Throws UnsupportedOperationException. |
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()
Prints information about the contents of the nodes in the tree's current in-memory state. |
java.lang.String |
printLockInfo()
Returns lock information. |
void |
purgeCacheLoaders()
Purges the contents of all configured CacheLoaders |
void |
put(Fqn fqn,
java.util.Map data)
Sets a node's data. |
void |
put(Fqn fqn,
java.util.Map data,
Option option)
The same as calling put(Fqn, Map) except apply options for this
specific method invocation. |
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(Fqn fqn,
java.lang.Object key,
java.lang.Object value,
Option option)
The same as calling put(Fqn, Object, Object) except apply options for this
specific method invocation. |
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)
Registers a specific classloader for a region defined by a fully qualified name. |
void |
releaseAllLocks(Fqn fqn)
Releases all locks for this node and the entire node subtree. |
void |
releaseAllLocks(java.lang.String fqn)
Releases all locks for this node and the entire node subtree. |
protected void |
releaseStateTransferLocks(DataNode root,
java.lang.Object lockOwner,
boolean childrenLocked)
Releases all state transfer locks acquired. |
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 |
java.lang.Object |
remove(Fqn fqn,
java.lang.Object key,
Option option)
The same as calling remove(Fqn, Object) except apply options for this
specific method invocation. |
void |
remove(Fqn fqn,
Option option)
The same as calling remove(Fqn) except apply options for this
specific method invocation. |
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)
Removes the keys and properties from a named node. |
void |
removeData(java.lang.String fqn)
Removes the keys and properties from a node. |
void |
removeTreeCacheListener(TreeCacheListener listener)
Removes a tree cache listener. |
void |
rollback(GlobalTransaction tx)
Throws UnsupportedOperationException. |
void |
setBuddyReplicationConfig(org.w3c.dom.Element config)
Sets the buddy replication configuration element |
void |
setCacheLoader(CacheLoader loader)
Deprecated. |
void |
setCacheLoaderAsynchronous(boolean b)
Deprecated. |
void |
setCacheLoaderClass(java.lang.String cache_loader_class)
Deprecated. |
void |
setCacheLoaderConfig(java.util.Properties cache_loader_config)
Deprecated. |
void |
setCacheLoaderConfiguration(org.w3c.dom.Element cache_loader_config)
Sets the cache loader configuration element. |
void |
setCacheLoaderFetchPersistentState(boolean flag)
Deprecated. |
void |
setCacheLoaderFetchTransientState(boolean flag)
Deprecated. |
void |
setCacheLoaderManager(CacheLoaderManager cacheLoaderManager)
Sets the CacheLoaderManager. |
void |
setCacheLoaderPassivation(boolean passivate)
Deprecated. |
void |
setCacheLoaderPreload(java.lang.String list)
Deprecated. |
void |
setCacheLoaderShared(boolean shared)
Deprecated. |
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)
Converts a list of elements to a Java Groups property string. |
void |
setClusterName(java.lang.String name)
Sets the name of the replication cluster group. |
void |
setClusterProperties(java.lang.String cluster_props)
Sets the cluster properties. |
void |
setDeadlockDetection(boolean dt)
Deprecated. |
void |
setEvictionListener(TreeCacheListener listener)
Sets the eviction listener. |
void |
setEvictionPolicyClass(java.lang.String eviction_policy_class)
Sets the classname of the eviction policy |
void |
setEvictionPolicyConfig(org.w3c.dom.Element config)
Sets the eviction policy configuration element. |
void |
setEvictionPolicyProvider(EvictionPolicy policy)
Deprecated. DO NOT USE THIS METHOD. IT IS PROVIDED FOR FULL JBCACHE 1.2 API BACKWARDS COMPATIBILITY |
void |
setFetchInMemoryState(boolean flag)
Sets whether or not any initial or subsequent partial state transfer should include in-memory state. |
void |
setFetchStateOnStartup(boolean flag)
Non-functional method maintained for compile time compatibility. |
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)
Sets the initial state transfer timeout. |
void |
setInterceptorChain(Interceptor i)
Used for testing only - sets the interceptor chain. |
void |
setInvocationContext(InvocationContext invocationContext)
Sets the thread-local invocation context |
void |
setIsolationLevel(IsolationLevel level)
|
void |
setIsolationLevel(java.lang.String level)
Set the transaction isolation level. |
void |
setIsUsingEviction(boolean usingEviction)
|
void |
setLockAcquisitionTimeout(long timeout)
Set the max time for lock acquisition. |
void |
setMultiplexerService(java.lang.String serviceName)
Sets the JGroups multiplexer service name. |
void |
setMultiplexerStack(java.lang.String name)
Used with JGroups multiplexer, specifies stack to be used (e.g., fc-fast-minimalthreads) This attribute is optional; if not provided, a default multiplexer stack will be used. |
protected void |
setNodeLockingOptimistic(boolean b)
Sets whether to use optimistic locking on the nodes. |
void |
setNodeLockingScheme(java.lang.String s)
Sets the node locking scheme as a string. |
void |
setPojoCacheConfig(org.w3c.dom.Element config)
Used for PojoCache. |
void |
setReplicationVersion(java.lang.String versionString)
Sets the replication version from a string. |
void |
setReplQueueInterval(long interval)
Sets the replication queue interval. |
void |
setReplQueueMaxElements(int max_elements)
Sets the replication queue max elements size. |
void |
setStateBytes(byte[] state)
Sets the state bytes in the message listener. |
void |
setStateTransferVersion(short version)
Deprecated. |
void |
setSyncCommitPhase(boolean sync_commit_phase)
Sets if sync commit phase is used. |
void |
setSyncReplTimeout(long timeout)
Sets the default maximum wait time for synchronous replication to receive all results |
void |
setSyncRollbackPhase(boolean sync_rollback_phase)
Sets if sync rollback phase is used. |
void |
setTransactionManagerLookup(TransactionManagerLookup l)
Sets the TransactionManagerLookup object |
void |
setTransactionManagerLookupClass(java.lang.String cl)
Sets the class of the TransactionManagerLookup impl. |
void |
setUseInterceptorMbeans(boolean useMbeans)
Sets if interceptor MBeans are in use. |
void |
setUseMarshalling(boolean isTrue)
Deprecated. |
void |
setUseRegionBasedMarshalling(boolean isTrue)
Sets whether marshalling uses scoped class loaders on a per region basis. |
void |
setUseReplQueue(boolean flag)
Sets if the replication queue should be used. |
void |
startService()
Lifecyle method. |
void |
stopService()
Lifecycle method. |
protected int |
string2Mode(java.lang.String mode)
Converts a replication, such as repl-async mode to an
integer. |
void |
suspect(org.jgroups.Address suspected_mbr)
Called when a member is suspected. |
java.lang.String |
toString()
Returns a debug string with few details. |
java.lang.String |
toString(boolean details)
Returns a debug string with optional details of contents. |
void |
unregisterClassLoader(java.lang.String fqn)
Unregisteres a class loader for a 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
Version.getVersionShort().
protected DataNode root
protected boolean hasListeners
protected org.jgroups.JChannel channel
protected java.lang.String mux_serviceName
protected java.lang.String mux_stackName
protected boolean coordinator
protected static final org.apache.commons.logging.Log log
protected java.lang.String cluster_name
protected java.lang.String cluster_props
getClusterProperties()protected final java.util.Vector members
protected org.jgroups.blocks.RpcDispatcher disp
protected org.jgroups.MessageListener ml
protected boolean use_repl_queue
protected int repl_queue_max_elements
protected long repl_queue_interval
protected boolean use_interceptor_mbeans
getUseInterceptorMbeans()protected boolean fetchInMemoryState
protected boolean usingEviction
protected long lock_acquisition_timeout
protected long state_fetch_timeout
protected long sync_repl_timeout
protected java.lang.String eviction_policy_class
protected int cache_mode
protected boolean inactiveOnStartup
protected boolean isStandalone
protected java.util.Set internalFqns
protected boolean isStateSet
protected java.lang.Exception setStateException
protected IsolationLevel isolationLevel
IsolationLevel.REPEATABLE_READ.
protected org.w3c.dom.Element evictConfig_
protected java.lang.String evictionInterceptorClass
protected boolean useRegionBasedMarshalling
protected VersionAwareMarshaller marshaller_
protected RegionManager regionManager_
protected RegionManager evictionRegionManager_
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 TransactionManagerLookup tm_lookup
ServiceMBeanSupport.start()
protected java.lang.String tm_lookup_class
protected javax.transaction.TransactionManager tm
protected org.w3c.dom.Element cacheLoaderConfig
protected CacheLoaderManager cacheLoaderManager
protected CacheLoaderConfig cloaderConfig
protected boolean sync_commit_phase
protected boolean sync_rollback_phase
protected EvictionPolicy eviction_policy_provider
protected ReplicationQueue repl_queue
public static final java.lang.String SEPARATOR
Fqn.SEPARATOR.public static final int LOCAL
public static final int REPL_ASYNC
public static final int REPL_SYNC
public static final int INVALIDATION_ASYNC
evict(org.jboss.cache.Fqn) calls to remote caches when a node is changed.
evict(org.jboss.cache.Fqn) calls are asynchronous.
public static final int INVALIDATION_SYNC
evict(org.jboss.cache.Fqn) calls to remote caches when a node is changed.
evict(org.jboss.cache.Fqn) calls are synchronous.
public static final java.lang.String UNINITIALIZED
protected boolean nodeLockingOptimistic
protected boolean useCreateService
protected org.w3c.dom.Element buddyReplicationConfig
protected BuddyManager buddyManager
protected final 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
java.lang.Exception
public TreeCache()
throws java.lang.Exception
java.lang.Exception
public TreeCache(org.jgroups.JChannel channel)
throws java.lang.Exception
java.lang.Exception| Method Detail |
|---|
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)
ServiceMBeanSupport.stop() and ServiceMBeanSupport.start().
setClusterProperties in interface TreeCacheMBeancluster_props - The properties for the cluster (JGroups)public java.lang.String getMultiplexerService()
TreeCacheMBean
getMultiplexerService in interface TreeCacheMBeanpublic void setMultiplexerService(java.lang.String serviceName)
TreeCacheMBean
setMultiplexerService in interface TreeCacheMBeanserviceName - the multiplexer service namepublic java.lang.String getMultiplexerStack()
TreeCacheMBean
getMultiplexerStack in interface TreeCacheMBeanpublic void setMultiplexerStack(java.lang.String name)
TreeCacheMBean
setMultiplexerStack in interface TreeCacheMBeanname - the name of the multiplexer stackpublic 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 TreeCacheMBeanpublic java.lang.String getInterceptorChain()
getInterceptorChain in interface TreeCacheMBeanpublic void setInterceptorChain(Interceptor i)
public java.util.List getInterceptors()
getInterceptors in interface TreeCacheMBeanpublic org.w3c.dom.Element getCacheLoaderConfiguration()
getCacheLoaderConfiguration in interface TreeCacheMBeanpublic void setCacheLoaderConfiguration(org.w3c.dom.Element cache_loader_config)
setCacheLoaderConfiguration in interface TreeCacheMBeanpublic CacheLoader getCacheLoader()
getCacheLoader in interface TreeCacheMBean
public void setPojoCacheConfig(org.w3c.dom.Element config)
throws CacheException
setPojoCacheConfig in interface TreeCacheMBeanconfig -
CacheExceptionpublic org.w3c.dom.Element getPojoCacheConfig()
getPojoCacheConfig in interface TreeCacheMBeanpublic org.jgroups.MessageListener getMessageListener()
public 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 TreeCacheMBeanpublic boolean getSyncRollbackPhase()
getSyncRollbackPhase in interface TreeCacheMBeanpublic void setSyncRollbackPhase(boolean sync_rollback_phase)
setSyncRollbackPhase in interface TreeCacheMBeanpublic void setEvictionPolicyConfig(org.w3c.dom.Element config)
setEvictionPolicyConfig in interface TreeCacheMBeanpublic org.w3c.dom.Element getEvictionPolicyConfig()
public java.lang.String getEvictionInterceptorClass()
public boolean isUsingEviction()
isUsingEviction in interface TreeCacheMBeanpublic void setIsUsingEviction(boolean usingEviction)
public void setClusterConfig(org.w3c.dom.Element config)
setClusterConfig in interface TreeCacheMBeanpublic long getInitialStateRetrievalTimeout()
getInitialStateRetrievalTimeout in interface TreeCacheMBeanpublic void setInitialStateRetrievalTimeout(long timeout)
setInitialStateRetrievalTimeout in interface TreeCacheMBeanpublic java.lang.String getCacheMode()
getCacheMode in interface TreeCacheMBeanpublic int getCacheModeInternal()
public void setNodeLockingScheme(java.lang.String s)
OPTIMISTIC, uses optimistic locking.
setNodeLockingScheme in interface TreeCacheMBeanpublic java.lang.String getNodeLockingScheme()
OPTIMISTIC or PESSIMISTIC.
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 TreeCacheMBeanpublic long getReplQueueInterval()
getReplQueueInterval in interface TreeCacheMBeanpublic void setReplQueueInterval(long interval)
setReplQueueInterval in interface TreeCacheMBeanpublic int getReplQueueMaxElements()
getReplQueueMaxElements in interface TreeCacheMBeanpublic void setReplQueueMaxElements(int max_elements)
setReplQueueMaxElements in interface TreeCacheMBeanpublic 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 TreeCacheMBeantrue if TreeCacheMBean.isInactiveOnStartup() is
false, buddy replication is not configured and
either TreeCacheMBean.getFetchInMemoryState() is true
or a cache loader's FetchPersistentState property
is true.public void setFetchStateOnStartup(boolean flag)
TreeCacheMBean
setFetchStateOnStartup in interface TreeCacheMBeanpublic void setFetchInMemoryState(boolean flag)
TreeCacheMBean
setFetchInMemoryState in interface TreeCacheMBeanpublic boolean getFetchInMemoryState()
TreeCacheMBeanactivateRegion call should
include in-memory state. Allows for warm/hot caches (true/false). The
characteristics of a state transfer can be further defined by a cache
loader's FetchPersistentState property.
getFetchInMemoryState in interface TreeCacheMBeanpublic boolean getFetchPersistentState()
true if there is a cache loader that has its
FetchPersistentState property set to truepublic 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 boolean getUseInterceptorMbeans()
getUseInterceptorMbeans in interface TreeCacheMBeanpublic void setUseInterceptorMbeans(boolean useMbeans)
public TreeCache getInstance()
this.
getInstance in interface TreeCacheMBean
public void fetchState(long timeout)
throws org.jgroups.ChannelClosedException,
org.jgroups.ChannelNotConnectedException
fetchState in interface TreeCacheMBeanorg.jgroups.ChannelClosedException
org.jgroups.ChannelNotConnectedExceptionpublic void setEvictionListener(TreeCacheListener listener)
public void addTreeCacheListener(TreeCacheListener listener)
addTreeCacheListener in interface TreeCacheMBeanpublic void removeTreeCacheListener(TreeCacheListener listener)
removeTreeCacheListener in interface TreeCacheMBeanpublic java.util.Collection 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.ServiceMBeanSupportpublic void setBuddyReplicationConfig(org.w3c.dom.Element config)
setBuddyReplicationConfig in interface TreeCacheMBeanconfig - public org.w3c.dom.Element getBuddyReplicationConfig()
getBuddyReplicationConfig in interface TreeCacheMBeanpublic BuddyManager getBuddyManager()
public java.util.Set getInternalFqns()
BuddyManager.BUDDY_BACKUP_SUBTREE if buddy replication is
enabled.
null.protected void createEvictionPolicy()
public void setEvictionPolicyProvider(EvictionPolicy policy)
public void setUseMarshalling(boolean isTrue)
setUseMarshalling in interface TreeCacheMBeansetUseRegionBasedMarshalling(boolean)public boolean getUseMarshalling()
getUseMarshalling in interface TreeCacheMBeangetUseRegionBasedMarshalling()public void setUseRegionBasedMarshalling(boolean isTrue)
true before any call to
registerClassLoader(String, ClassLoader) or
activateRegion(String)
setUseRegionBasedMarshalling in interface TreeCacheMBeanisTrue - public boolean getUseRegionBasedMarshalling()
getUseRegionBasedMarshalling 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
TreeCacheMarshaller is used for marshalling.
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 existing registering for the fqn.
java.lang.IllegalStateException - if marshalling is not being usedgetUseMarshalling(),
getMarshaller()
public void unregisterClassLoader(java.lang.String fqn)
throws RegionNotFoundException
unregisterClassLoader in interface TreeCacheMBeanfqn - The fqn region.
RegionNotFoundException - If there is a conflict in fqn specification.
java.lang.IllegalStateException - if marshalling is not being usedgetUseMarshalling()
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
public void _loadState(Fqn subtreeRoot,
Fqn integrationRoot,
java.lang.Object[] sources,
java.lang.ClassLoader cl)
throws java.lang.Exception
subtreeRoot - Fqn of the topmost node in the subtree whose
state should be transferred.integrationRoot - Fqn of the node into which state should be integratedsources - the cluster nodes to query for statecl - the classloader to use to unmarshal the state.
Can be null.
java.lang.Exception
public void _loadState(Fqn subtreeRoot,
DataNode integrationRoot,
java.lang.Object[] sources,
java.lang.ClassLoader cl)
throws java.lang.Exception
subtreeRoot - Fqn of the topmost node in the subtree whose
state should be transferred.integrationRoot - the DataNode into which state should be integratedsources - the cluster nodes to query for statecl - the classloader to use to unmarshal the state.
Can be null.
java.lang.Exception
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
subtree - FQN of the subtree region
java.lang.ThrowableRegion.getMethodCallQueue()
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.Throwable
public byte[] _getState(Fqn fqn,
boolean fetchTransientState,
boolean fetchPersistentState,
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.Throwable
protected byte[] _getAssociatedState(Fqn fqn,
long timeout,
boolean force)
throws java.lang.Exception
_getState(Fqn, long, boolean, boolean) is called for an Fqn. Typically this would be state
stored outside of the subtree that is somehow associated with the subtree.
This method is designed for overriding by
PojoCache.
The implementation in this class returns null.
This method will only be invoked if
getCacheLoaderFetchTransientState() returns true.
fqn - the fqn that represents the root node of the subtree.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.
null. This implementation returns null.
java.lang.Exception
public void _setState(byte[] new_state,
Fqn targetRoot,
java.lang.ClassLoader cl)
throws java.lang.Exception
targetRoot
to match the given state. Updates the contents of targetRoot
to reflect those in new_state.
NOTE: This method performs no locking of nodes; it
is up to the caller to lock targetRoot before calling
this method.
new_state - a serialized byte[][] array where element 0 is the
transient state (or null) , and element 1 is the
persistent state (or null)targetRoot - fqn of the node into which the state should be integratedcl - classloader to use to unmarshal the state, or
null if the TCCL should be used
java.lang.Exceptionpublic java.lang.String getReplicationVersion()
getReplicationVersion in interface TreeCacheMBean124
for JBossCache 1.2.4public void setReplicationVersion(java.lang.String versionString)
setReplicationVersion in interface TreeCacheMBeanversionString - a short identifying JBossCache release;
e.g. 124 for JBossCache 1.2.4Version.getVersionShort()public short getReplicationVersionShort()
public short getStateTransferVersion()
getReplicationVersionShort().
getStateTransferVersion in interface TreeCacheMBean124
for JBossCache 1.2.4public void setStateTransferVersion(short version)
setReplicationVersion(java.lang.String) with the version string
from Version.getVersionString(short).
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)
acquireLocksForStateTransfer(org.jboss.cache.DataNode, java.lang.Object, long, boolean, boolean)
protected void forceAcquireLock(DataNode node,
java.lang.Object newOwner,
boolean lockChildren)
node - the nodenewOwner - the new owner (usually a Thread or GlobalTransaction)lockChildren - true if this method should be recursively
applied to node's children.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 DataNode get(Fqn fqn,
Option option)
throws CacheException
get(Fqn) except that you can pass in options for this specific method invocation.
Option
get in interface TreeCacheMBeanfqn - option -
CacheException
public java.lang.Object get(Fqn fqn,
java.lang.Object key,
Option option)
throws CacheException
Option
get in interface TreeCacheMBeanfqn - option -
CacheException
public java.lang.Object get(Fqn fqn,
java.lang.Object key,
boolean sendNodeEvent,
Option option)
throws CacheException
get(Fqn, Object, boolean) except apply options for this
specific method invocation.
get in interface TreeCacheMBeanCacheException
public void remove(Fqn fqn,
Option option)
throws CacheException
remove(Fqn) except apply options for this
specific method invocation.
remove in interface TreeCacheMBeanCacheException
public java.lang.Object remove(Fqn fqn,
java.lang.Object key,
Option option)
throws CacheException
remove(Fqn, Object) except apply options for this
specific method invocation.
remove in interface TreeCacheMBeanCacheException
public java.util.Set getChildrenNames(Fqn fqn,
Option option)
throws CacheException
getChildrenNames(Fqn) except apply options for this
specific method invocation.
getChildrenNames in interface TreeCacheMBeanCacheException
public void put(Fqn fqn,
java.util.Map data,
Option option)
throws CacheException
put(Fqn, Map) except apply options for this
specific method invocation.
put in interface TreeCacheMBeanCacheException
public void put(Fqn fqn,
java.lang.Object key,
java.lang.Object value,
Option option)
throws CacheException
put(Fqn, Object, Object) except apply options for this
specific method invocation.
put in interface TreeCacheMBeanCacheException
public Node get(Fqn fqn)
throws CacheException
get in interface TreeCacheMBeanfqn - name of the DataNode to retreive
CacheException
public Node _get(Fqn fqn)
throws CacheException
CacheExceptionpublic java.util.Map _getData(Fqn fqn)
UNINITIALIZED
indicating the node was not completely loaded.
public java.util.Set getKeys(java.lang.String fqn)
throws CacheException
getKeys in interface TreeCacheMBeanfqn - name of the node
CacheException
public java.util.Set getKeys(Fqn fqn)
throws CacheException
getKeys in interface TreeCacheMBeanfqn - name of the node
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
get(java.lang.String) returns null. After
that, the contents will be in sync.
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 TreeCacheMBeanCacheException
public void removeData(Fqn fqn)
throws CacheException
removeData in interface TreeCacheMBeanCacheExceptionpublic void releaseAllLocks(java.lang.String fqn)
releaseAllLocks in interface TreeCacheMBeanpublic void releaseAllLocks(Fqn fqn)
releaseAllLocks in interface TreeCacheMBeanpublic 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
CacheExceptiongetChildrenNames(Fqn)
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 TreeCacheMBeanpublic int getNumberOfAttributes(Fqn fqn)
getNumberOfAttributes()
public java.util.List callRemoteMethods(java.util.List mbrs,
org.jgroups.blocks.MethodCall method_call,
boolean synchronous,
boolean exclude_self,
long timeout)
throws java.lang.Exception
mbrs - method_call - synchronous - exclude_self - timeout -
java.lang.Exception
public java.util.List callRemoteMethods(java.util.List mbrs,
org.jgroups.blocks.MethodCall method_call,
int mode,
boolean exclude_self,
long timeout)
throws java.lang.Exception
mbrs - method_call - mode - exclude_self - timeout -
java.lang.Exception
public java.util.List callRemoteMethods(java.util.List members,
java.lang.reflect.Method method,
java.lang.Object[] args,
boolean synchronous,
boolean exclude_self,
long timeout)
throws java.lang.Exception
members - method - args - synchronous - exclude_self - timeout -
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 TreeCacheMBeanjava.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 TreeCacheMBeanCacheException
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 TreeCacheMBeanCacheException
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 TreeCacheMBeanCacheException
public void _remove(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops)
throws CacheException
_remove in interface TreeCacheMBeanCacheException
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 void _remove(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent,
boolean eviction,
DataVersion version)
throws CacheException
DataVersion which is used with optimistically locked nodes. Pass
in a null if optimistic locking is not used.
tx - fqn - create_undo_ops - sendNodeEvent - eviction - version -
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
CacheException
public void _removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops)
throws CacheException
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 _removeData(GlobalTransaction tx,
Fqn fqn,
boolean create_undo_ops,
boolean sendNodeEvent,
boolean eviction,
DataVersion version)
throws CacheException
CacheException
public void _evict(Fqn fqn)
throws CacheException
fqn - removes everything assoicated with this FQN
CacheException
public void _evict(Fqn fqn,
DataVersion version)
throws CacheException
fqn - version -
CacheException
public void _addChild(GlobalTransaction tx,
Fqn parent_fqn,
java.lang.Object child_name,
DataNode old_node)
throws CacheException
_remove(GlobalTransaction,Fqn,boolean).
CacheException
public java.lang.Object _replicate(org.jgroups.blocks.MethodCall method_call)
throws java.lang.Throwable
java.lang.Throwable
public void _replicate(java.util.List method_calls)
throws java.lang.Throwable
java.lang.Throwable
public java.util.List _clusteredGet(org.jgroups.blocks.MethodCall methodCall,
java.lang.Boolean searchBackupSubtrees)
public java.util.List _gravitateData(Fqn fqn,
boolean searchSubtrees,
boolean marshal)
throws CacheException
fqn - the fqn to gravitatesearchSubtrees - should _BUDDY_BACKUP_ subtrees be searchedmarshal - should the list of NodeData being gravitated be marshalled into
a byte[] or returned as a List
List with 1 or 3 elements. First element is a
Boolean indicating whether data was found. If
Boolean.FALSE, the list will only have one element.
Otherwise, second element is the data itself, structured as
a List of NodeData objects, each of
which represents one Node in the subtree rooted
at fqn. If param mnarshal is
true, this second element will have been marshalled
to a byte[], otherwise it will be the raw list.
The third element represents the Fqn in the _BUDDY_BACKUP_
region that needs to be cleaned in order to remove this data
once the new owner has acquired it.
CacheException
public void _remoteAssignToBuddyGroup(BuddyGroup group,
java.util.Map state)
throws java.lang.Exception
m - args - searchBackupSubtrees -
java.lang.Exceptionpublic void _remoteRemoveFromBuddyGroup(java.lang.String groupName)
public void _remoteAnnounceBuddyPoolName(org.jgroups.stack.IpAddress address,
java.lang.String buddyPoolName)
public void _dataGravitationCleanup(GlobalTransaction gtx,
Fqn primary,
Fqn backup)
throws java.lang.Exception
java.lang.Exceptionpublic void _releaseAllLocks(Fqn fqn)
public java.lang.String _print(Fqn fqn)
org.jboss.cache.DataNode#toString() value for the Fqn.
Returns null if not found or upon error.
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 onePhaseCommit)
public void prepare(GlobalTransaction global_tx,
java.util.List modifications,
org.jgroups.Address coord,
boolean onePhaseCommit)
public void commit(GlobalTransaction tx)
public void rollback(GlobalTransaction tx)
public void addUndoOperation(GlobalTransaction gtx,
org.jgroups.blocks.MethodCall undo_op)
public CacheLoaderManager getCacheLoaderManager()
public void setCacheLoaderManager(CacheLoaderManager cacheLoaderManager)
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()
public GlobalTransaction getCurrentTransaction(boolean createIfNotExists)
public GlobalTransaction getCurrentTransaction(javax.transaction.Transaction tx)
public GlobalTransaction getCurrentTransaction(javax.transaction.Transaction tx,
boolean createIfNotExists)
createIfNotExists - if true, if a global transaction is not found; one is created
protected java.lang.Object invokeMethod(org.jgroups.blocks.MethodCall m)
throws CacheException
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 RegionManager getRegionManager()
public RegionManager getEvictionRegionManager()
public VersionAwareMarshaller getMarshaller()
public 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)
repl-async mode to an
integer.
public void setInvocationContext(InvocationContext invocationContext)
invocationContext - the context for the current invocationpublic InvocationContext getInvocationContext()
public void setCacheLoaderClass(java.lang.String cache_loader_class)
setCacheLoaderClass in interface TreeCacheMBeansetCacheLoaderConfiguration(org.w3c.dom.Element)public void setCacheLoaderConfig(java.util.Properties cache_loader_config)
setCacheLoaderConfig in interface TreeCacheMBeansetCacheLoaderConfiguration(org.w3c.dom.Element)public void setCacheLoaderShared(boolean shared)
setCacheLoaderShared in interface TreeCacheMBeansetCacheLoaderConfiguration(org.w3c.dom.Element)public void setCacheLoaderPassivation(boolean passivate)
setCacheLoaderPassivation in interface TreeCacheMBeansetCacheLoaderConfiguration(org.w3c.dom.Element)public void setCacheLoaderPreload(java.lang.String list)
setCacheLoaderPreload in interface TreeCacheMBeansetCacheLoaderConfiguration(org.w3c.dom.Element)public void setCacheLoaderAsynchronous(boolean b)
setCacheLoaderAsynchronous in interface TreeCacheMBeansetCacheLoaderConfiguration(org.w3c.dom.Element)public void setCacheLoaderFetchPersistentState(boolean flag)
setCacheLoaderFetchPersistentState in interface TreeCacheMBeansetCacheLoaderConfiguration(org.w3c.dom.Element)public void setCacheLoaderFetchTransientState(boolean flag)
setCacheLoaderFetchTransientState in interface TreeCacheMBeansetCacheLoaderConfiguration(org.w3c.dom.Element)public void setCacheLoader(CacheLoader loader)
setCacheLoader in interface TreeCacheMBeanloader - public java.lang.String getCacheLoaderClass()
getCacheLoaderConfiguration() instead.
getCacheLoaderClass in interface TreeCacheMBeanpublic boolean getCacheLoaderShared()
getCacheLoaderConfiguration() instead.
getCacheLoaderShared in interface TreeCacheMBeanpublic boolean getCacheLoaderPassivation()
getCacheLoaderConfiguration() instead.
getCacheLoaderPassivation in interface TreeCacheMBeanpublic boolean getCacheLoaderAsynchronous()
getCacheLoaderConfiguration() instead.
getCacheLoaderAsynchronous in interface TreeCacheMBeanpublic java.lang.String getCacheLoaderPreload()
getCacheLoaderConfiguration() instead.
getCacheLoaderPreload in interface TreeCacheMBeanpublic boolean getCacheLoaderFetchPersistentState()
getCacheLoaderConfiguration() instead.
getCacheLoaderFetchPersistentState in interface TreeCacheMBeanpublic boolean getCacheLoaderFetchTransientState()
getCacheLoaderConfiguration() instead.
getCacheLoaderFetchTransientState in interface TreeCacheMBeanpublic java.util.Properties getCacheLoaderConfig()
getCacheLoaderConfig in interface TreeCacheMBean
public void purgeCacheLoaders()
throws java.lang.Exception
CacheLoaders
purgeCacheLoaders in interface TreeCacheMBeanjava.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||