站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

InvalidationManager (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.cache.invalidation
Class InvalidationManager

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.cache.invalidation.InvalidationManager
All Implemented Interfaces:
InvalidationManagerMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class InvalidationManager
extends org.jboss.system.ServiceMBeanSupport
implements InvalidationManagerMBean

Implementation of InvalidationManagerMBean

Version:
$Revision: 1.5.6.2 $

Revisions:

21 septembre 2002 Sacha Labourey:

  • First implementation
Author:
Sacha Labourey.
See Also:
InvalidationManagerMBean

Field Summary
protected  Vector bridgeSubscribers
           
static String DEFAULT_INVALIDERS_JMX_NAME
           
static String DEFAULT_JMX_SERVICE_NAME
           
protected  boolean DEFAULT_TO_ASYNCHRONOUS_MODE
           
protected  Hashtable groups
           
protected  int hashcode
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
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
 
Constructor Summary
InvalidationManager()
           
 
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.
protected  void bridgeGroupInvalidateAllEvent(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl source, String groupName)
           
protected  void bridgeGroupInvalidationEvent(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl source, String groupName, Serializable key)
           
protected  void bridgeGroupInvalidationEvent(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl source, String groupName, Serializable[] keys)
           
protected  InvalidationGroup createGroup(String groupName)
           
protected  void crossDomainBatchInvalidate(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl source, BatchInvalidation[] invalidations, boolean asynchronous)
           
protected  void crossDomainInvalidateAll(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl source, String groupName, boolean asynchronous)
           
protected  void doBridgedOnlyInvalidateAll(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl exceptSource, String groupName)
           
protected  void doBridgedOnlyInvalidation(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl exceptSource, String groupName, Serializable key)
           
protected  void doBridgedOnlyInvalidation(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl exceptSource, String groupName, Serializable[] keys)
           
protected  void doLocalOnlyInvalidateAll(String groupName, boolean asynchronous)
           
protected  void doLocalOnlyInvalidation(String groupName, Serializable key, boolean asynchronous)
           
protected  void doLocalOnlyInvalidations(String groupName, Serializable[] keys, boolean asynchronous)
           
 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
 int hashCode()
           
 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.
protected  void localGroupInvalidateAllEvent(String groupName, boolean asynchronous)
           
protected  void localGroupInvalidationEvent(String groupName, Serializable key, boolean asynchronous)
           
protected  void localGroupInvalidationsEvent(String groupName, Serializable[] keys, boolean asynchronous)
           
 BridgeInvalidationSubscription registerBridgeListener(InvalidationBridgeListener listener)
          Allow the subscription of a given Bridge to this IM
protected  void removeGroup(String groupName)
           
 void startService()
           
 void stopService()
           
protected  void unregisterBridgeListener(BridgeInvalidationSubscription bridgeSubscriber)
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, 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
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

DEFAULT_JMX_SERVICE_NAME

public static final String DEFAULT_JMX_SERVICE_NAME
See Also:
Constant Field Values

DEFAULT_INVALIDERS_JMX_NAME

public static final String DEFAULT_INVALIDERS_JMX_NAME
See Also:
Constant Field Values

groups

protected Hashtable groups

bridgeSubscribers

protected Vector bridgeSubscribers

hashcode

protected int hashcode

DEFAULT_TO_ASYNCHRONOUS_MODE

protected boolean DEFAULT_TO_ASYNCHRONOUS_MODE
Constructor Detail

InvalidationManager

public InvalidationManager()
Method Detail

startService

public void startService()
                  throws Exception
Throws:
Exception

stopService

public void stopService()

getInvalidationGroups

public Collection getInvalidationGroups()
Description copied from interface: InvalidationManagerMBean
Return the set of all InvalidationGroup currently managed by this IM

Specified by:
getInvalidationGroups in interface InvalidationManagerMBean
Returns:
A collection of InvalidationGroup instances

getInvalidationGroup

public InvalidationGroup getInvalidationGroup(String groupName)
Description copied from interface: InvalidationManagerMBean
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.

Specified by:
getInvalidationGroup in interface InvalidationManagerMBean
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

registerBridgeListener

public BridgeInvalidationSubscription registerBridgeListener(InvalidationBridgeListener listener)
Description copied from interface: InvalidationManagerMBean
Allow the subscription of a given Bridge to this IM

Specified by:
registerBridgeListener in interface InvalidationManagerMBean
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)
Description copied from interface: InvalidationManagerMBean
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.

Specified by:
batchInvalidate in interface InvalidationManagerMBean
Parameters:
invalidations - A set of BatchcInvalidations. Each BatchInvalidation instance contains invalidations for a given InvalidationGroup.

batchInvalidate

public void batchInvalidate(BatchInvalidation[] invalidations,
                            boolean asynchronous)
Description copied from interface: InvalidationManagerMBean
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).

Specified by:
batchInvalidate in interface InvalidationManagerMBean
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)
Description copied from interface: InvalidationManagerMBean
Invalidate all entries for the specified group name.

Specified by:
invalidateAll in interface InvalidationManagerMBean
Parameters:
groupName - invalidation group name

invalidateAll

public void invalidateAll(String groupName,
                          boolean async)
Description copied from interface: InvalidationManagerMBean
Invalidate all entries for the specified group name using the specified mode.

Specified by:
invalidateAll in interface InvalidationManagerMBean
Parameters:
groupName - invalidate group name
async - mode

hashCode

public int hashCode()

createGroup

protected InvalidationGroup createGroup(String groupName)

removeGroup

protected void removeGroup(String groupName)

unregisterBridgeListener

protected void unregisterBridgeListener(BridgeInvalidationSubscription bridgeSubscriber)

doLocalOnlyInvalidation

protected void doLocalOnlyInvalidation(String groupName,
                                       Serializable key,
                                       boolean asynchronous)

doLocalOnlyInvalidations

protected void doLocalOnlyInvalidations(String groupName,
                                        Serializable[] keys,
                                        boolean asynchronous)

doLocalOnlyInvalidateAll

protected void doLocalOnlyInvalidateAll(String groupName,
                                        boolean asynchronous)

doBridgedOnlyInvalidation

protected void doBridgedOnlyInvalidation(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl exceptSource,
                                         String groupName,
                                         Serializable key)

doBridgedOnlyInvalidation

protected void doBridgedOnlyInvalidation(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl exceptSource,
                                         String groupName,
                                         Serializable[] keys)

doBridgedOnlyInvalidateAll

protected void doBridgedOnlyInvalidateAll(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl exceptSource,
                                          String groupName)

localGroupInvalidationEvent

protected void localGroupInvalidationEvent(String groupName,
                                           Serializable key,
                                           boolean asynchronous)

localGroupInvalidationsEvent

protected void localGroupInvalidationsEvent(String groupName,
                                            Serializable[] keys,
                                            boolean asynchronous)

localGroupInvalidateAllEvent

protected void localGroupInvalidateAllEvent(String groupName,
                                            boolean asynchronous)

bridgeGroupInvalidationEvent

protected void bridgeGroupInvalidationEvent(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl source,
                                            String groupName,
                                            Serializable key)

bridgeGroupInvalidationEvent

protected void bridgeGroupInvalidationEvent(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl source,
                                            String groupName,
                                            Serializable[] keys)

bridgeGroupInvalidateAllEvent

protected void bridgeGroupInvalidateAllEvent(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl source,
                                             String groupName)

crossDomainBatchInvalidate

protected void crossDomainBatchInvalidate(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl source,
                                          BatchInvalidation[] invalidations,
                                          boolean asynchronous)

crossDomainInvalidateAll

protected void crossDomainInvalidateAll(org.jboss.cache.invalidation.InvalidationManager.BridgeInvalidationSubscriptionImpl source,
                                        String groupName,
                                        boolean asynchronous)


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