Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.cache.invalidation
Interface InvalidationManagerMBean

All Superinterfaces:
  org.jboss.system.Service, org.jboss.system.ServiceMBean

All Known Implementing Classes:
  InvalidationManager

public interface InvalidationManagerMBean
extends org.jboss.system.ServiceMBean

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.

Version:
  $Revision: 1.2.6.1 $

  Revisions:

  21 septembre 2002 Sacha Labourey:

  - First implementation
Author:
  Sacha Labourey.
See Also:
  `InvalidationManager`

Field Summary

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` | `batchInvalidate(BatchInvalidation[] invalidations)` Invalidate a set of IG managed by this IM.
`void` | `batchInvalidate(BatchInvalidation[] invalidations, boolean asynchronous)` Identical as previous method.
`InvalidationGroup` | `getInvalidationGroup(String groupName)` Returns a given InvalidationGroup instance that is associated with the group name.
`Collection` | `getInvalidationGroups()` Return the set of all InvalidationGroup currently managed by this IM
`void` | `invalidateAll(String groupName)` Invalidate all entries for the specified group name.
`void` | `invalidateAll(String groupName, boolean async)` Invalidate all entries for the specified group name using the specified mode.
`BridgeInvalidationSubscription` | `registerBridgeListener(InvalidationBridgeListener listener)` Allow the subscription of a given Bridge to this IM

Methods inherited from interface org.jboss.system.ServiceMBean
`getName, getState, getStateString, jbossInternalLifecycle`

Methods inherited from interface org.jboss.system.Service
`create, destroy, start, stop`

Method Detail

### getInvalidationGroup

    public InvalidationGroup getInvalidationGroup(String groupName)

  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).
  Returns:
    The InvalidationGroup associated to the group name i.e. the identifier of the set

### getInvalidationGroups

    public Collection getInvalidationGroups()

  Return the set of all InvalidationGroup currently managed by this IM

  Returns:
    A collection of InvalidationGroup instances

### registerBridgeListener

    public BridgeInvalidationSubscription registerBridgeListener(InvalidationBridgeListener listener)

  Allow the subscription of a given Bridge to this IM

  Parameters:
    `listener` - The Bridge registring for invalidation messages
  Returns:
    A BridgeInvalidationSubscription instance that can is used by the bridge to communicate with the local IM.
  See Also:
    `BridgeInvalidationSubscription`

### batchInvalidate

    public void batchInvalidate(BatchInvalidation[] invalidations)

  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 invalidations for a given InvalidationGroup.

### batchInvalidate

    public void batchInvalidate(BatchInvalidation[] invalidations,
                                boolean asynchronous)

  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
    `asynchronous` - Indicates if the briges should try to do asynchronous invalidations (accross the network for example) or if a synchronous behaviour is required.

### invalidateAll

    public void invalidateAll(String groupName)

  Invalidate all entries for the specified group name.

  Parameters:
    `groupName` - invalidation group name

### invalidateAll

    public void invalidateAll(String groupName,
                              boolean async)

  Invalidate all entries for the specified group name using the specified mode.

  Parameters:
    `groupName` - invalidate group name
    `async` - mode

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002 JBoss Group, LLC. All Rights Reserved.