|
||||||||||
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
public static final int REPL_ASYNC
public static final int REPL_SYNC
public static final java.lang.String UNINITIALIZED
Constructor Detail |
public TreeCache(java.lang.String cluster_name, java.lang.String props, long state_fetch_timeout) throws java.lang.Exception
public TreeCache() throws java.lang.Exception
public TreeCache(JChannel channel) throws java.lang.Exception
Method Detail |
public MessageListener getMessageListener()
public static boolean isCrudMethod(java.lang.reflect.Method m)
public Node (src) getRoot()
public java.lang.Object getLocalAddress()
public java.util.Vector getMembers()
public boolean isCoordinator()
public java.lang.String getClusterName()
public void setClusterName(java.lang.String name)
public java.lang.String getClusterProperties()
public void setClusterProperties(java.lang.String cluster_props)
cluster_props
- The properties for the cluster (JGroups)public TransactionTable (src) getTransactionTable()
public java.util.HashMap getLockTable()
public java.lang.String dumpTransactionTable()
public boolean getDeadlockDetection()
public void setDeadlockDetection(boolean dt)
dt
- public java.lang.String getInterceptorChain()
public java.util.List getInterceptors()
public java.lang.String getCacheLoaderClass()
public void setCacheLoaderClass(java.lang.String cache_loader_class)
cache_loader_class
- public java.util.Properties getCacheLoaderConfig()
public void setCacheLoaderConfig(java.util.Properties cache_loader_config)
cache_loader_config
- public CacheLoader (src) getCacheLoader()
public void setCacheLoader(CacheLoader (src) cache_loader)
cache_loader
- public boolean getCacheLoaderShared()
public void setCacheLoaderShared(boolean shared)
shared
- public void setCacheLoaderPreload(java.lang.String list)
list
- public java.lang.String getCacheLoaderPreload()
public void setCacheLoaderFetchPersistentState(boolean flag)
flag
- public boolean getCacheLoaderFetchPersistentState()
public void setCacheLoaderFetchTransientState(boolean flag)
flag
- public boolean getCacheLoaderFetchTransientState()
public boolean getSyncCommitPhase()
public void setSyncCommitPhase(boolean sync_commit_phase)
sync_commit_phase
- public boolean getSyncRollbackPhase()
public void setSyncRollbackPhase(boolean sync_rollback_phase)
sync_rollback_phase
- public void setEvictionPolicyConfig(org.w3c.dom.Element config)
public org.w3c.dom.Element getEvictionPolicyConfig()
public void setClusterConfig(org.w3c.dom.Element config)
public long getInitialStateRetrievalTimeout()
public void setInitialStateRetrievalTimeout(long timeout)
getInitialStateRetrievalTimeout()
)
public java.lang.String getCacheMode()
public int getCacheModeInternal()
public void setCacheMode(java.lang.String mode) throws java.lang.Exception
java.lang.Exception
public void setCacheMode(int mode)
mode
- public long getSyncReplTimeout()
public void setSyncReplTimeout(long timeout)
public boolean getUseReplQueue()
public void setUseReplQueue(boolean flag)
flag
- public long getReplQueueInterval()
public void setReplQueueInterval(long interval)
interval
- public int getReplQueueMaxElements()
public void setReplQueueMaxElements(int max_elements)
max_elements
- public ReplicationQueue (src) getReplQueue()
public java.lang.String getIsolationLevel()
public void setIsolationLevel(java.lang.String level)
public void setIsolationLevel(IsolationLevel (src) level)
level
- public IsolationLevel (src) getIsolationLevelClass()
public boolean getFetchStateOnStartup()
public void setFetchStateOnStartup(boolean flag)
flag
- public long getLockAcquisitionTimeout()
public void setLockAcquisitionTimeout(long timeout)
timeout
- public java.lang.String getEvictionPolicyClass()
public void setEvictionPolicyClass(java.lang.String eviction_policy_class)
public int getEvictionThreadWakeupIntervalSeconds()
public void setTransactionManagerLookup(TransactionManagerLookup (src) l)
l
- public java.lang.String getTransactionManagerLookupClass()
public void setTransactionManagerLookupClass(java.lang.String cl) throws java.lang.Exception
cl
-
java.lang.Exception
public TransactionManager (src) getTransactionManager()
public TreeCache (src) getInstance()
public void setReplicationHandler(Replicatable (src) handler)
public Replicatable (src) getReplicationHandler()
public void fetchState(long timeout) throws ChannelClosedException, ChannelNotConnectedException
ChannelClosedException
ChannelNotConnectedException
public void addTreeCacheListener(TreeCacheListener (src) listener)
listener
- public void removeTreeCacheListener(TreeCacheListener (src) listener)
listener
- public void createService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
createService
in class ServiceMBeanSupport (src)
java.lang.Exception
public void destroyService()
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
destroyService
in class ServiceMBeanSupport (src)
public void startService() throws java.lang.Exception
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
startService
in class ServiceMBeanSupport (src)
java.lang.Exception
protected void createInterceptorChain() throws java.lang.IllegalAccessException, java.lang.InstantiationException, java.lang.ClassNotFoundException
CallInterceptor LockInterceptor [CacheLoaderInterceptor] [ReplicationInterceptor] [CacheStoreInterceptor] or CallInterceptor LockInterceptor [CacheStoreInterceptor] [CacheLoaderInterceptor] [ReplicationInterceptor]CallInterceptor is always present at the top, the others may or may not be present
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.ClassNotFoundException
protected void createCacheLoader() throws java.lang.Exception
java.lang.Exception
protected void cacheLoaderPreload() throws java.lang.Exception
java.lang.Exception
public void load(java.lang.String fqn) throws java.lang.Exception
fqn
-
java.lang.Exception
protected boolean determineCoordinator()
public Address getCoordinator()
public byte[] getStateBytes()
public void setStateBytes(byte[] state)
protected void fetchStateOnStartup() throws java.lang.Exception
java.lang.Exception
public void stopService()
ServiceMBeanSupport (src)
This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.
stopService
in class ServiceMBeanSupport (src)
public Node (src) get(java.lang.String fqn) throws CacheException (src)
fqn
- fqn String name to retrieve from cache
CacheException (src)
public Node (src) get(Fqn (src) fqn) throws CacheException (src)
fqn
- fqn instance to retrieve from cache
CacheException (src)
public Node (src) _get(Fqn (src) fqn) throws CacheException (src)
CacheException (src)
public java.util.Set getKeys(java.lang.String fqn) throws CacheException (src)
fqn
-
CacheException (src)
public java.util.Set getKeys(Fqn (src) fqn) throws CacheException (src)
fqn
-
CacheException (src)
public java.util.Set _getKeys(Fqn (src) fqn) throws CacheException (src)
CacheException (src)
public java.lang.Object get(java.lang.String fqn, java.lang.Object key) throws CacheException (src)
data
map. Returns null if the node was not found in the tree or the key was not found in the hashmap.
fqn
- The fully qualified name of the node.key
- The key.
CacheException (src)
public java.lang.Object get(Fqn (src) fqn, java.lang.Object key) throws CacheException (src)
data
map. Returns null if the node was not found in the tree or the key was not found in the hashmap.
fqn
- The fully qualified name of the node.key
- The key.
CacheException (src)
public java.lang.Object _get(Fqn (src) fqn, java.lang.Object key, boolean sendNodeEvent) throws CacheException (src)
CacheException (src)
protected java.lang.Object get(Fqn (src) fqn, java.lang.Object key, boolean sendNodeEvent) throws CacheException (src)
CacheException (src)
public java.lang.Object peek(Fqn (src) fqn, java.lang.Object key) throws CacheException (src)
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
-
CacheException (src)
public boolean exists(java.lang.String fqn)
fqn
- The fully qualified name of the node
public boolean exists(Fqn (src) fqn)
fqn
- The fully qualified name of the node
public boolean exists(java.lang.String fqn, java.lang.Object key)
fqn
- key
-
public boolean exists(Fqn (src) fqn, java.lang.Object key)
get(Fqn,Object)
fqn
- The fully qualified name of the nodekey
-
public void put(java.lang.String fqn, java.util.Map data) throws CacheException (src)
fqn
- The fully qualified name of the new nodedata
- The new data. May be null if no data should be set in the node.
CacheException (src)
public void put(Fqn (src) fqn, java.util.Map data) throws CacheException (src)
fqn
- The fully qualified name of the new nodedata
- The new data. May be null if no data should be set in the node.
CacheException (src)
public java.lang.Object put(java.lang.String fqn, java.lang.Object key, java.lang.Object value) throws CacheException (src)
fqn
- The fully qualified name of the nodekey
- The keyvalue
- The value
CacheException (src)
public java.lang.Object putFailFast(Fqn (src) fqn, java.lang.Object key, java.lang.Object value, long timeout) throws CacheException (src)
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 (src)
public java.lang.Object putFailFast(java.lang.String fqn, java.lang.Object key, java.lang.Object value, long timeout) throws CacheException (src)
fqn
- key
- value
- timeout
-
CacheException (src)
public java.lang.Object put(Fqn (src) fqn, java.lang.Object key, java.lang.Object value) throws CacheException (src)
fqn
- The fully qualified name of the nodekey
- The keyvalue
- The value
CacheException (src)
public void remove(java.lang.String fqn) throws CacheException (src)
fqn
- The fully qualified name of the node.
CacheException (src)
public void remove(Fqn (src) fqn) throws CacheException (src)
fqn
- The fully qualified name of the node.
CacheException (src)
public void evict(Fqn (src) fqn) throws CacheException (src)
fqn
- Will remove everythign assoicated with this fqn.
CacheException (src)
public java.lang.Object remove(java.lang.String fqn, java.lang.Object key) throws CacheException (src)
key
from the node's hashmap
fqn
- The fullly qualified name of the nodekey
- The key to be removed
CacheException (src)
public java.lang.Object remove(Fqn (src) fqn, java.lang.Object key) throws CacheException (src)
key
from the node's hashmap
fqn
- The fullly qualified name of the nodekey
- The key to be removed
CacheException (src)
public void removeData(java.lang.String fqn) throws CacheException (src)
fqn
-
CacheException (src)
public void removeData(Fqn (src) fqn) throws CacheException (src)
fqn
-
CacheException (src)
public void releaseAllLocks(java.lang.String fqn)
fqn
- public void releaseAllLocks(Fqn (src) fqn)
fqn
- public java.lang.String print(java.lang.String fqn)
fqn
.
Output includes name, fqn and data.
public java.lang.String print(Fqn (src) fqn)
fqn
.
Output includes name, fqn and data.
public java.util.Set getChildrenNames(java.lang.String fqn) throws CacheException (src)
fqn
- The fully qualified name of the node
CacheException (src)
public java.util.Set getChildrenNames(Fqn (src) fqn) throws CacheException (src)
fqn
- The fully qualified name of the node
CacheException (src)
public java.util.Set _getChildrenNames(Fqn (src) fqn) throws CacheException (src)
CacheException (src)
public boolean hasChild(Fqn (src) fqn)
public java.lang.String toString()
public java.lang.String toString(boolean details)
public java.lang.String printDetails()
public java.lang.String printLockInfo()
public int getNumberOfLocksHeld()
public int getNumberOfNodes()
public int getNumberOfAttributes()
public java.util.List callRemoteMethods(java.util.Vector mbrs, MethodCall method_call, boolean synchronous, boolean exclude_self, long timeout) throws java.lang.Exception
java.lang.Exception
public java.util.List callRemoteMethods(java.util.Vector members, java.lang.reflect.Method method, java.lang.Object[] args, boolean synchronous, boolean exclude_self, long timeout) throws java.lang.Exception
members
- method
- args
- synchronous
- exclude_self
- timeout
-
java.lang.Exception
public java.util.List callRemoteMethods(java.util.Vector members, java.lang.String method_name, java.lang.Class[] types, java.lang.Object[] args, boolean synchronous, boolean exclude_self, long timeout) throws java.lang.Exception
members
- method_name
- types
- args
- synchronous
- exclude_self
- timeout
-
java.lang.Exception
public void _put(GlobalTransaction (src) tx, java.lang.String fqn, java.util.Map data, boolean create_undo_ops) throws CacheException (src)
TransactionEntry
(src) 's lock list, (b) add nodes
that were created to TransactionEntry
(src) 's node list and (c) create
Modification
(src) s and add them to TransactionEntry
(src) 's modification
list and (d) create compensating modifications to undo the changes in case
of a rollback
fqn
- data
- create_undo_ops
- If true, undo operations will be created (default is true).
Otherwise they will not be created (used by rollback()).
CacheException (src)
public void _put(GlobalTransaction (src) tx, Fqn (src) fqn, java.util.Map data, boolean create_undo_ops) throws CacheException (src)
TransactionEntry
(src) 's lock list, (b) add nodes
that were created to TransactionEntry
(src) 's node list and (c) create
Modification
(src) s and add them to TransactionEntry
(src) 's modification
list and (d) create compensating modifications to undo the changes in case
of a rollback
fqn
- data
- create_undo_ops
- If true, undo operations will be created (default is true).
Otherwise they will not be created (used by rollback()).
CacheException (src)
public void _put(GlobalTransaction (src) tx, Fqn (src) fqn, java.util.Map data, boolean create_undo_ops, boolean erase_contents) throws CacheException (src)
TransactionEntry
(src) 's lock list, (b) add nodes
that were created to TransactionEntry
(src) 's node list and (c) create
Modification
(src) s and add them to TransactionEntry
(src) 's modification
list and (d) create compensating modifications to undo the changes in case
of a rollback
fqn
- 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 (src)
public java.lang.Object _put(GlobalTransaction (src) tx, java.lang.String fqn, java.lang.Object key, java.lang.Object value, boolean create_undo_ops) throws CacheException (src)
fqn
- key
- value
-
CacheException (src)
public java.lang.Object _put(GlobalTransaction (src) tx, Fqn (src) fqn, java.lang.Object key, java.lang.Object value, boolean create_undo_ops) throws CacheException (src)
fqn
- key
- value
-
CacheException (src)
public java.lang.Object _put(GlobalTransaction (src) tx, Fqn (src) fqn, java.lang.Object key, java.lang.Object value, boolean create_undo_ops, long timeout) throws CacheException (src)
CacheException (src)
public void _remove(GlobalTransaction (src) tx, java.lang.String fqn, boolean create_undo_ops) throws CacheException (src)
fqn
-
CacheException (src)
public void _remove(GlobalTransaction (src) tx, Fqn (src) fqn, boolean create_undo_ops) throws CacheException (src)
fqn
-
CacheException (src)
public void _remove(GlobalTransaction (src) tx, Fqn (src) fqn, boolean create_undo_ops, boolean sendNodeEvent) throws CacheException (src)
CacheException (src)
public void _remove(GlobalTransaction (src) tx, Fqn (src) fqn, boolean create_undo_ops, boolean sendNodeEvent, boolean eviction) throws CacheException (src)
tx
- fqn
- create_undo_ops
- sendNodeEvent
-
CacheException (src)
public java.lang.Object _remove(GlobalTransaction (src) tx, java.lang.String fqn, java.lang.Object key, boolean create_undo_ops) throws CacheException (src)
fqn
- key
-
CacheException (src)
public java.lang.Object _remove(GlobalTransaction (src) tx, Fqn (src) fqn, java.lang.Object key, boolean create_undo_ops) throws CacheException (src)
fqn
- key
-
CacheException (src)
public java.lang.Object _remove(GlobalTransaction (src) tx, Fqn (src) fqn, java.lang.Object key, boolean create_undo_ops, boolean sendNodeEvent) throws CacheException (src)
CacheException (src)
public void _removeData(GlobalTransaction (src) tx, java.lang.String fqn, boolean create_undo_ops) throws CacheException (src)
fqn
-
CacheException (src)
public void _removeData(GlobalTransaction (src) tx, Fqn (src) fqn, boolean create_undo_ops) throws CacheException (src)
fqn
-
CacheException (src)
public void _removeData(GlobalTransaction (src) tx, Fqn (src) fqn, boolean create_undo_ops, boolean sendNodeEvent) throws CacheException (src)
CacheException (src)
public void _removeData(GlobalTransaction (src) tx, Fqn (src) fqn, boolean create_undo_ops, boolean sendNodeEvent, boolean eviction) throws CacheException (src)
CacheException (src)
public void _evict(Fqn (src) fqn) throws CacheException (src)
fqn
- Will remove everythign assoicated with this fqn.
CacheException (src)
public void _addChild(GlobalTransaction (src) tx, Fqn (src) parent_fqn, java.lang.Object child_name, Node (src) old_node) throws CacheException (src)
_remove(GlobalTransaction,Fqn,boolean)
. This
is package-private on purpose because it is only supposed to be called inside
the same VM (by rollback(GlobalTransaction)
).
parent_fqn
- child_name
- old_node
-
CacheException (src)
public java.lang.Object _replicate(MethodCall method_call) throws java.lang.Throwable
method_call
-
java.lang.Throwable
public void _releaseAllLocks(Fqn (src) fqn)
public java.lang.String _print(Fqn (src) fqn)
public void _lock(Fqn (src) fqn, int lock_type, boolean recursive) throws TimeoutException (src) , LockingException (src)
TimeoutException (src)
LockingException (src)
public void prepare(GlobalTransaction (src) global_tx, java.util.List modifications, Address coord, boolean commit)
public void commit(GlobalTransaction (src) tx)
public void rollback(GlobalTransaction (src) tx)
public void addNode(GlobalTransaction (src) gtx, Fqn (src) node)
public void viewAccepted(View new_view)
public void suspect(Address suspected_mbr)
public void block()
protected Transaction (src) getLocalTransaction()
getCurrentTransaction()
public GlobalTransaction (src) getCurrentTransaction()
GlobalTransaction
(src) . The mapping is maintained in the tx_map table.
If a local transaction exists, but doesn't yet have a mapping to a GlobalTransaction,
a new GlobalTransaction will be created and mapped to the local transaction.
Note that if a local transaction exists, but is not ACTIVE or PREPARING, null is returned too.
public GlobalTransaction (src) getCurrentTransaction(Transaction (src) tx)
protected java.lang.Object invokeMethod(MethodCall m) throws CacheException (src)
m
-
CacheException (src)
public void notifyNodeCreated(Fqn (src) fqn)
public void notifyNodeLoaded(Fqn (src) fqn)
protected void notifyNodeRemoved(Fqn (src) fqn)
protected void notifyNodeEvicted(Fqn (src) fqn)
protected void notifyNodeModified(Fqn (src) fqn)
protected void notifyNodeVisisted(Fqn (src) fqn)
protected void notifyCacheStarted()
protected void notifyCacheStopped()
protected void notifyViewChange(View v)
protected void notifyAllNodesCreated(Node (src) curr)
protected java.lang.String getDefaultProperties()
protected int string2Mode(java.lang.String mode)
|
||||||||||
PREV CLASS (src) NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |