| org.jboss.cache.invalidation.InvalidationManagerMBean
All known Subclasses: org.jboss.cache.invalidation.InvalidationManager,
InvalidationManagerMBean | public interface InvalidationManagerMBean extends ServiceMBean(Code) | | Main service dealing with cache invalidation. While more than one instance may
be running at the same time, most of the time, only one will be used.
Each InvalidationManager (IM) gives access to a set of InvalidationGroup (IG).
Each IG concerns a particular cache and links subscribers that listen for cache
invalidations messages with cache invaliders that will create invalidation
messages.
Thus, to start, a given service will first ask for a specific IG to work with. This
is an in-VM operation: each cache and invalider works with a *locally* bound IM. If
you want to extend the in-VM mode of operation, you need to provide (possibly
dynamically), your IM-Bridge. A bridge forwards cache-invalidation messages on other
nodes. It may select which IG are bridged. More than one cache can be bound to a
given IM.
As some applications needs to be able to send in batch invalidation messages that concern
more than one cache. To satisfy this need, a global batchInvalidate method is available
at the IM level.
See Also: org.jboss.cache.invalidation.InvalidationManager author: Sacha Labourey. version: $Revision: 57209 $ version: Revisions: version: 21 septembre 2002 Sacha Labourey: version: version: - First implementation
version:
|
batchInvalidate | public void batchInvalidate(BatchInvalidation[] invalidations)(Code) | | Invalidate a set of IG managed by this IM. This can be used as an optimisation
if a bridge will forward requests accross a cluster. In this case, a single message
containing all invocations is send accross the wire (it only costs a single network
latency). The IM will manage the dispatching of the invalidation messages to the
Bridges and to the concerned InvalidationGroups.
Parameters: invalidations - A set of BatchcInvalidations. Each BatchInvalidation instance contains invalidationsfor a given InvalidationGroup. |
batchInvalidate | public void batchInvalidate(BatchInvalidation[] invalidations, boolean asynchronous)(Code) | | Identical as previous method. In this case though, it is override the default
"asynchronous" tag of each InvalidationGroup and explicitly state if the invalidation
messages should be, if possible, be done asynchronously (if implemented by the
bridges for example).
Parameters: invalidations - Invalidation messages Parameters: asynchronous - Indicates if the briges should try to do asynchronous invalidations (accross thenetwork for example) or if a synchronous behaviour is required. |
getInvalidationGroup | public InvalidationGroup getInvalidationGroup(String groupName)(Code) | | Returns a given InvalidationGroup instance that is associated with the group name.
All caches that will share the same cache invalidation messages must share the
same group name => the group name (or the IG) represents the identifier of
a set of caches and invaliders.
NOTE: InvalidationGroup.addReference is automatically called when calling this method
Thus, there is no need to call it again on the IG. Nevertheless,
you are still responsible for calling removeReference to GC IG.
Parameters: groupName - Name of the group (of the cache for example). The InvalidationGroup associated to the group name i.e. the identifier of the set |
getInvalidationGroups | public Collection getInvalidationGroups()(Code) | | Return the set of all InvalidationGroup currently managed by this IM
A collection of InvalidationGroup instances |
getIsAsynchByDefault | public boolean getIsAsynchByDefault()(Code) | | Get the is default asynchronous replication mode flag
|
invalidateAll | public void invalidateAll(String groupName)(Code) | | Invalidate all entries for the specified group name.
Parameters: groupName - invalidation group name |
invalidateAll | public void invalidateAll(String groupName, boolean async)(Code) | | Invalidate all entries for the specified group name using the specified mode.
Parameters: groupName - invalidate group name Parameters: async - mode |
setIsAsynchByDefault | public void setIsAsynchByDefault(boolean flag)(Code) | | Set the is default asynchronous replication mode flag
Parameters: flag - - true for asynch by default |
|
|