org.jboss.cache.aop
Interface TreeCacheAopMBean
- All Superinterfaces:
- org.jboss.system.Service, org.jboss.system.ServiceMBean, TreeCacheMBean
- All Known Implementing Classes:
- TreeCacheAop
public interface TreeCacheAopMBean
- extends TreeCacheMBean
MBean interface.
- Author:
- Harald Gliebe, Ben Wang
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 |
Method Summary |
void |
evict(Fqn fqn)
Override to provide aop specific eviction. |
java.util.Map |
findObjects(Fqn fqn)
Query all managed pojo objects under the fqn recursively. |
java.util.Map |
findObjects(java.lang.String fqn)
Query all managed pojo objects under the fqn recursively. |
CachedType |
getCachedType(java.lang.Class clazz)
Obtain a cache aop type for user to traverse the defined "primitive" types in aop. |
java.lang.Object |
getObject(Fqn fqn)
Retrieve the aop-enabled object from the cache. |
java.lang.Object |
getObject(java.lang.String fqn)
Retrieve the aop-enabled object from the cache. |
java.lang.Object |
putObject(Fqn fqn,
java.lang.Object obj)
Insert an aop-enabled object into the cache. |
java.lang.Object |
putObject(java.lang.String fqn,
java.lang.Object obj)
Insert an aop-enabled object into the cache. |
java.lang.Object |
removeObject(Fqn fqn)
Remove aop-enabled object from the cache. |
java.lang.Object |
removeObject(java.lang.String fqn)
Remove aop-enabled object from the cache. |
void |
setEvictionPolicyClass(java.lang.String eviction_policy_class)
Over-ride to make sure we are using an eviction policy specific to aop. |
Methods inherited from interface org.jboss.cache.TreeCacheMBean |
_put, _put, _put, _put, _put, _remove, _remove, _remove, _remove, activateRegion, addTreeCacheListener, callRemoteMethods, callRemoteMethods, createService, destroyService, dumpTransactionTable, exists, exists, exists, exists, fetchState, get, get, get, get, get, get, get, getCacheLoader, getCacheLoaderAsynchronous, getCacheLoaderClass, getCacheLoaderConfig, getCacheLoaderConfiguration, getCacheLoaderFetchPersistentState, getCacheLoaderFetchTransientState, getCacheLoaderPassivation, getCacheLoaderPreload, getCacheLoaderShared, getCacheMode, getChildrenNames, getChildrenNames, getChildrenNames, getClusterName, getClusterProperties, getDeadlockDetection, getEvictionPolicyClass, getEvictionThreadWakeupIntervalSeconds, getFetchInMemoryState, getFetchStateOnStartup, getInitialStateRetrievalTimeout, getInstance, getInterceptorChain, getInterceptors, getIsolationLevel, getKeys, getKeys, getLocalAddress, getLockAcquisitionTimeout, getMembers, getNodeLockingScheme, getNumberOfAttributes, getNumberOfLocksHeld, getNumberOfNodes, getReplicationVersion, getReplQueueInterval, getReplQueueMaxElements, getStateTransferVersion, getSyncCommitPhase, getSyncReplTimeout, getSyncRollbackPhase, getTransactionManager, getTransactionManagerLookupClass, getUseInterceptorMbeans, getUseMarshalling, getUseReplQueue, getVersion, inactivateRegion, isCoordinator, isInactiveOnStartup, load, print, print, printDetails, printLockInfo, put, put, put, put, put, put, registerClassLoader, releaseAllLocks, releaseAllLocks, remove, remove, remove, remove, remove, remove, removeData, removeData, removeTreeCacheListener, setCacheLoader, setCacheLoaderAsynchronous, setCacheLoaderClass, setCacheLoaderConfig, setCacheLoaderConfiguration, setCacheLoaderFetchPersistentState, setCacheLoaderFetchTransientState, setCacheLoaderPassivation, setCacheLoaderPreload, setCacheLoaderShared, setCacheMode, setClusterConfig, setClusterName, setClusterProperties, setDeadlockDetection, setEvictionPolicyConfig, setFetchInMemoryState, setFetchStateOnStartup, setInactiveOnStartup, setInitialStateRetrievalTimeout, setIsolationLevel, setLockAcquisitionTimeout, setNodeLockingScheme, setReplicationVersion, setReplQueueInterval, setReplQueueMaxElements, setStateTransferVersion, setSyncCommitPhase, setSyncReplTimeout, setSyncRollbackPhase, setTransactionManagerLookup, setTransactionManagerLookupClass, setUseInterceptorMbeans, setUseMarshalling, setUseReplQueue, startService, stopService, toString, unregisterClassLoader |
Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
setEvictionPolicyClass
void setEvictionPolicyClass(java.lang.String eviction_policy_class)
- Over-ride to make sure we are using an eviction policy specific to aop.
- Specified by:
setEvictionPolicyClass
in interface TreeCacheMBean
putObject
java.lang.Object putObject(java.lang.String fqn,
java.lang.Object obj)
throws CacheException
- Insert an aop-enabled object into the cache. It will also recursively put the any sub-object that is declared as aop-capable (i.e., in
jboss-aop.xml
). Note that List
, Map
, Set
attributes are aop-enabled, by default, as well.
- Parameters:
fqn
- The fqn string name to associate with the object in the cache.obj
- aop-enabled object to be inerted into the cache. If null, it will nullify the fqn node.obj
- Return the previous content under fqn.
- Throws:
CacheException
putObject
java.lang.Object putObject(Fqn fqn,
java.lang.Object obj)
throws CacheException
- Insert an aop-enabled object into the cache. It will also recursively put the any sub-object that is declared as aop-capable (i.e., in
jboss-aop.xml
). Note that List
, Map
, Set
attributes are aop-enabled, by default, as well.
- Parameters:
fqn
- The fqn instance to associate with the object in the cache.obj
- aop-enabled object to be inerted into the cache. If null, it will nullify the fqn node.obj
- Return the previous content under fqn.
- Throws:
CacheException
getObject
java.lang.Object getObject(java.lang.String fqn)
throws CacheException
- Retrieve the aop-enabled object from the cache.
- Parameters:
fqn
- String name that associates with this node.
- Returns:
- Current content value. Null if does not exist.
- Throws:
CacheException
getObject
java.lang.Object getObject(Fqn fqn)
throws CacheException
- Retrieve the aop-enabled object from the cache. Return null if object does not exist in the cache.
- Parameters:
fqn
- Instance that associates with this node.
- Returns:
- Current content value. Null if does not exist.
- Throws:
CacheException
removeObject
java.lang.Object removeObject(java.lang.String fqn)
throws CacheException
- Remove aop-enabled object from the cache.
- Parameters:
fqn
- String name that associates with this node.
- Returns:
- Value object from this node.
- Throws:
CacheException
removeObject
java.lang.Object removeObject(Fqn fqn)
throws CacheException
- Remove aop-enabled object from the cache.
- Parameters:
fqn
- Instance that associates with this node.
- Returns:
- Original value object from this node.
- Throws:
CacheException
evict
void evict(Fqn fqn)
throws CacheException
- Override to provide aop specific eviction.
Called by eviction policy provider. Note that eviction is done only in local mode, that is, it doesn't replicate the node removal. This is will cause the replcation nodes not synchronizing, but it is ok since user is supposed to add the node again when get is null. After that, the contents will be in sync.
- Specified by:
evict
in interface TreeCacheMBean
- Parameters:
fqn
- Will remove everythign assoicated with this fqn.
- Throws:
CacheException
findObjects
java.util.Map findObjects(java.lang.String fqn)
throws CacheException
- Query all managed pojo objects under the fqn recursively. Note that this will not return the sub-object pojos,
e.g., if Person has a sub-object of Address, it won't return Address pojo. Note also that this operation is
not thread-safe now. In addition, it assumes that once a pojo is found with a fqn, no more pojo is stored
under the children of the fqn. That is, we don't mixed the fqn with different pojos.
- Parameters:
fqn
- The starting place to find all pojos.
- Returns:
- Map of all pojos found with (fqn, pojo) pair. Return size of 0, if not found.
- Throws:
CacheException
findObjects
java.util.Map findObjects(Fqn fqn)
throws CacheException
- Query all managed pojo objects under the fqn recursively. Note that this will not return the sub-object pojos,
e.g., if Person has a sub-object of Address, it won't return Address pojo. Note also that this operation is
not thread-safe now. In addition, it assumes that once a pojo is found with a fqn, no more pojo is stored
under the children of the fqn. That is, we don't mixed the fqn with different pojos.
- Parameters:
fqn
- The starting place to find all pojos.
- Returns:
- Map of all pojos found with (fqn, pojo) pair. Return size of 0, if not found.
- Throws:
CacheException
getCachedType
CachedType getCachedType(java.lang.Class clazz)
- Obtain a cache aop type for user to traverse the defined "primitive" types in aop.
- Parameters:
clazz
- The original pojo class
- Returns:
- CachedType
Copyright © 1998-2005 JBoss Inc . All Rights Reserved.