|
||||||||||
| PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
org.jboss.system.ServiceMBeanSupport (src)
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 | |
static java.lang.reflect.Method |
addChildMethodLocal
|
protected CacheLoader (src) |
cache_loader
A reference to the CacheLoader. |
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 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 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
|
protected RpcDispatcher |
disp
|
protected org.w3c.dom.Element |
evictConfig_
Eviction policy configuration in xml Element |
protected java.lang.String |
eviction_policy_class
|
protected TreeCacheListener (src) |
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
|
protected Interceptor (src) |
interceptor_chain
invokeMethod(MethodCall) will dispatch to this chain of interceptors. |
protected IsolationLevel (src) |
isolationLevel
|
protected boolean |
isStateSet
|
protected java.util.Vector |
listeners
|
static int |
LOCAL
Entries in the cache are by default local; ie. |
protected long |
lock_acquisition_timeout
|
static java.lang.reflect.Method |
lockMethodLocal
|
protected java.util.Vector |
members
|
protected MessageListener |
ml
|
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
|
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 (src) |
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 (src) |
replication_handler
Interceptor which handles invocations of _replicate(MethodCall). |
static java.lang.reflect.Method |
rollbackMethod
|
protected Node (src) |
root
|
static java.lang.String |
SEPARATOR
|
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 TransactionManager (src) |
tm
Used to get the Transaction associated with the current thread |
protected TransactionManagerLookup (src) |
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
|
| Fields inherited from class org.jboss.system.ServiceMBeanSupport (src) |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from interface org.jboss.system.ServiceMBean (src) |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
| Constructor Summary | |
TreeCache()
|
|
TreeCache(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 (src) tx,
Fqn (src) parent_fqn,
java.lang.Object child_name,
Node (src) old_node)
Compensating method to _remove(GlobalTransaction,Fqn,boolean). |
void |
_evict(Fqn (src) fqn)
Called by eviction policy provider. |
Node (src) |
_get(Fqn (src) fqn)
|
java.lang.Object |
_get(Fqn (src) fqn,
java.lang.Object key,
boolean sendNodeEvent)
|
java.util.Set |
_getChildrenNames(Fqn (src) fqn)
|
java.util.Set |
_getKeys(Fqn (src) fqn)
|
void |
_lock(Fqn (src) fqn,
int lock_type,
boolean recursive)
|
java.lang.String |
_print(Fqn (src) fqn)
|
void |
_put(GlobalTransaction (src) tx,
Fqn (src) fqn,
java.util.Map data,
boolean create_undo_ops)
Does the real work. |
void |
_put(GlobalTransaction (src) tx,
Fqn (src) fqn,
java.util.Map data,
boolean create_undo_ops,
boolean erase_contents)
Does the real work. |
java.lang.Object |
_put(GlobalTransaction (src) tx,
Fqn (src) fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops)
|
java.lang.Object |
_put(GlobalTransaction (src) tx,
Fqn (src) fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops,
long timeout)
|
void |
_put(GlobalTransaction (src) tx,
java.lang.String fqn,
java.util.Map data,
boolean create_undo_ops)
Does the real work. |
java.lang.Object |
_put(GlobalTransaction (src) tx,
java.lang.String fqn,
java.lang.Object key,
java.lang.Object value,
boolean create_undo_ops)
|
void |
_releaseAllLocks(Fqn (src) fqn)
|
void |
_remove(GlobalTransaction (src) tx,
Fqn (src) fqn,
boolean create_undo_ops)
|
void |
_remove(GlobalTransaction (src) tx,
Fqn (src) fqn,
boolean create_undo_ops,
boolean sendNodeEvent)
|
void |
_remove(GlobalTransaction (src) tx,
Fqn (src) fqn,
boolean create_undo_ops,
boolean sendNodeEvent,
boolean eviction)
Remove a node |
java.lang.Object |
_remove(GlobalTransaction (src) tx,
Fqn (src) fqn,
java.lang.Object key,
boolean create_undo_ops)
|
java.lang.Object |
_remove(GlobalTransaction (src) tx,
Fqn (src) fqn,
java.lang.Object key,
boolean create_undo_ops,
boolean sendNodeEvent)
|
void |
_remove(GlobalTransaction (src) tx,
java.lang.String fqn,
boolean create_undo_ops)
|
java.lang.Object |
_remove(GlobalTransaction (src) tx,
java.lang.String fqn,
java.lang.Object key,
boolean create_undo_ops)
|
void |
_removeData(GlobalTransaction (src) tx,
Fqn (src) fqn,
boolean create_undo_ops)
|
void |
_removeData(GlobalTransaction (src) tx,
Fqn (src) fqn,
boolean create_undo_ops,
boolean sendNodeEvent)
|
void |
_removeData(GlobalTransaction (src) tx,
Fqn (src) fqn,
boolean create_undo_ops,
boolean sendNodeEvent,
boolean eviction)
|
void |
_removeData(GlobalTransaction (src) tx,
java.lang.String fqn,
boolean create_undo_ops)
|
java.lang.Object |
_replicate(MethodCall method_call)
Invoked by the ReplicationInterceptor of other nodes in the cluster, to replicate their changes across the cluster. |
void |
addNode(GlobalTransaction (src) gtx,
Fqn (src) node)
|
void |
addTreeCacheListener(TreeCacheListener (src) listener)
|
void |
block()
Block sending and receiving of messages until viewAccepted() is called |
protected void |
cacheLoaderPreload()
|
java.util.List |
callRemoteMethods(java.util.Vector mbrs,
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 (src) 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()
Assembles the interceptor stack. |
void |
createService()
Sub-classes should override this method to provide custum 'create' logic. |
void |
destroyService()
Sub-classes should override this method to provide custum 'destroy' logic. |
protected boolean |
determineCoordinator()
|
java.lang.String |
dumpTransactionTable()
Dumps the contents of the TransactionTable |
void |
evict(Fqn (src) fqn)
Called by eviction policy provider. |
boolean |
exists(Fqn (src) fqn)
Checks whether a given node exists in the tree. |
boolean |
exists(Fqn (src) 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 (src) |
get(Fqn (src) fqn)
|
java.lang.Object |
get(Fqn (src) 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 (src) fqn,
java.lang.Object key,
boolean sendNodeEvent)
|
Node (src) |
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 (src) |
getCacheLoader()
|
java.lang.String |
getCacheLoaderClass()
|
java.util.Properties |
getCacheLoaderConfig()
|
boolean |
getCacheLoaderFetchPersistentState()
|
boolean |
getCacheLoaderFetchTransientState()
|
java.lang.String |
getCacheLoaderPreload()
|
boolean |
getCacheLoaderShared()
|
java.lang.String |
getCacheMode()
Returns the current caching mode. |
int |
getCacheModeInternal()
|
java.util.Set |
getChildrenNames(Fqn (src) 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. |
Address |
getCoordinator()
|
GlobalTransaction (src) |
getCurrentTransaction()
Get the transaction associated with the current thread and maps it onto a GlobalTransaction (src) . |
GlobalTransaction (src) |
getCurrentTransaction(Transaction (src) 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()
|
long |
getInitialStateRetrievalTimeout()
Get the max time to wait until the initial state is retrieved. |
TreeCache (src) |
getInstance()
|
java.lang.String |
getInterceptorChain()
|
java.util.List |
getInterceptors()
|
java.lang.String |
getIsolationLevel()
Returns the transaction isolation level. |
IsolationLevel (src) |
getIsolationLevelClass()
|
java.util.Set |
getKeys(Fqn (src) fqn)
|
java.util.Set |
getKeys(java.lang.String fqn)
|
java.lang.Object |
getLocalAddress()
|
protected Transaction (src) |
getLocalTransaction()
Returns the transaction associated with the current thread. |
long |
getLockAcquisitionTimeout()
Default max time to wait for a lock. |
java.util.HashMap |
getLockTable()
|
java.util.Vector |
getMembers()
|
MessageListener |
getMessageListener()
|
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. |
Replicatable (src) |
getReplicationHandler()
|
ReplicationQueue (src) |
getReplQueue()
|
long |
getReplQueueInterval()
|
int |
getReplQueueMaxElements()
|
Node (src) |
getRoot()
Used by interceptors. |
byte[] |
getStateBytes()
|
boolean |
getSyncCommitPhase()
|
long |
getSyncReplTimeout()
Returns the default max timeout after which synchronous replication calls return. |
boolean |
getSyncRollbackPhase()
|
TransactionManager (src) |
getTransactionManager()
|
java.lang.String |
getTransactionManagerLookupClass()
|
TransactionTable (src) |
getTransactionTable()
|
boolean |
getUseReplQueue()
|
boolean |
hasChild(Fqn (src) fqn)
|
protected java.lang.Object |
invokeMethod(MethodCall m)
Invokes a method against this object. |
boolean |
isCoordinator()
|
static boolean |
isCrudMethod(java.lang.reflect.Method m)
|
void |
load(java.lang.String fqn)
Loads the indicated Fqn, plus all parents recursively from the CacheLoader. |
protected void |
notifyAllNodesCreated(Node (src) curr)
Generates NodeAdded notifications for all nodes of the tree. |
protected void |
notifyCacheStarted()
|
protected void |
notifyCacheStopped()
|
void |
notifyNodeCreated(Fqn (src) fqn)
|
protected void |
notifyNodeEvicted(Fqn (src) fqn)
|
void |
notifyNodeLoaded(Fqn (src) fqn)
|
protected void |
notifyNodeModified(Fqn (src) fqn)
|
protected void |
notifyNodeRemoved(Fqn (src) fqn)
|
protected void |
notifyNodeVisisted(Fqn (src) fqn)
|
protected void |
notifyViewChange(View v)
|
java.lang.Object |
peek(Fqn (src) fqn,
java.lang.Object key)
Like get() method but without triggering a node visit event. |
void |
prepare(GlobalTransaction (src) global_tx,
java.util.List modifications,
Address coord,
boolean commit)
|
java.lang.String |
print(Fqn (src) 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 (src) fqn,
java.util.Map data)
Adds a new node to the tree and sets its data. |
java.lang.Object |
put(Fqn (src) 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 (src) 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 |
releaseAllLocks(Fqn (src) 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 |
void |
remove(Fqn (src) fqn)
Removes the node from the tree. |
java.lang.Object |
remove(Fqn (src) 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 (src) fqn)
|
void |
removeData(java.lang.String fqn)
|
void |
removeTreeCacheListener(TreeCacheListener (src) listener)
|
void |
rollback(GlobalTransaction (src) tx)
|
void |
setCacheLoader(CacheLoader (src) cache_loader)
|
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 |
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)
|
void |
setInitialStateRetrievalTimeout(long timeout)
Set the initial state transfer timeout (see getInitialStateRetrievalTimeout()) |
void |
setIsolationLevel(IsolationLevel (src) level)
|
void |
setIsolationLevel(java.lang.String level)
Set the transaction isolation level. |
void |
setLockAcquisitionTimeout(long timeout)
Set the max time for lock acquisition. |
void |
setReplicationHandler(Replicatable (src) handler)
|
void |
setReplQueueInterval(long interval)
|
void |
setReplQueueMaxElements(int max_elements)
|
void |
setStateBytes(byte[] state)
|
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 (src) l)
Sets the TransactionManagerLookup object |
void |
setTransactionManagerLookupClass(java.lang.String cl)
Sets the class of the TransactionManagerLookup impl. |
void |
setUseReplQueue(boolean flag)
|
void |
startService()
Sub-classes should override this method to provide custum 'start' logic. |
void |
stopService()
Sub-classes should override this method to provide custum 'stop' logic. |
protected int |
string2Mode(java.lang.String mode)
|
void |
suspect(Address suspected_mbr)
Called when a member is suspected |
java.lang.String |
toString()
|
java.lang.String |
toString(boolean details)
|
void |
viewAccepted(View new_view)
|
| Methods inherited from class org.jboss.system.ServiceMBeanSupport (src) |
create, destroy, 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 (src) |
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Node (src) root
protected final java.util.Vector listeners
protected JChannel channel
protected boolean coordinator
protected java.lang.String cluster_name
protected java.lang.String cluster_props
protected final java.util.Vector members
protected RpcDispatcher disp
protected 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 boolean fetch_state_on_startup
protected long lock_acquisition_timeout
protected java.lang.String eviction_policy_class
protected TreeCacheListener (src) eviction_policy_provider
protected int cache_mode
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
protected boolean isStateSet
protected IsolationLevel (src) isolationLevel
protected org.w3c.dom.Element evictConfig_
protected Interceptor (src) 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 (src) replication_handler
_replicate(MethodCall). Any such method
invocation is forwarded to the invoke_handler.
protected TransactionManagerLookup (src) tm_lookup
ServiceMBeanSupport.start()
protected java.lang.String tm_lookup_class
protected TransactionManager (src) tm
protected java.lang.String cache_loader_class
protected CacheLoader (src) cache_loader
protected java.util.Properties cache_loader_config
protected boolean cache_loader_shared
protected java.util.List cache_loader_preload
protected boolean cache_loader_fetch_transient_state
protected boolean cache_loader_fetch_persistent_state
protected boolean sync_commit_phase
protected boolean sync_rollback_phase
protected boolean deadlockDetection
protected ReplicationQueue (src) repl_queue
public static final java.lang.String SEPARATOR
public static final int LOCAL