org.jboss.cache.invalidation.bridges
Class JGCacheInvalidationBridge

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.cache.invalidation.bridges.JGCacheInvalidationBridge
All Implemented Interfaces:
MBeanRegistration, NotificationBroadcaster, NotificationEmitter, JGCacheInvalidationBridgeMBean, InvalidationBridgeListener, org.jboss.ha.framework.interfaces.DistributedReplicantManager.ReplicantListener, org.jboss.ha.framework.interfaces.DistributedState.DSListenerEx, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, ServiceMBean

public class JGCacheInvalidationBridge
extends ServiceMBeanSupport
implements JGCacheInvalidationBridgeMBean, org.jboss.ha.framework.interfaces.DistributedState.DSListenerEx, InvalidationBridgeListener, org.jboss.ha.framework.interfaces.DistributedReplicantManager.ReplicantListener

JGroups implementation of a cache invalidation bridge

Version:
$Revision: 81001 $

Revisions:

24 septembre 2002 Sacha Labourey:

Author:
Sacha Labourey.
See Also:
JGCacheInvalidationBridgeMBean

Field Summary
protected  Vector bridgedGroups
           
protected  String bridgeName
           
protected  BridgeInvalidationSubscription invalidationSubscription
           
protected  InvalidationManagerMBean invalMgr
           
protected  Collection localGroups
           
protected  org.jboss.ha.framework.interfaces.HAPartition partition
          The ClusterPartition with which we are associated.
protected static Class[] rpc_batch_invalidate_types
           
protected  String RPC_HANDLER_NAME
           
protected static Class[] rpc_invalidate_all_types
           
protected static Class[] rpc_invalidate_types
           
protected static Class[] rpc_invalidates_types
           
 
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
JGCacheInvalidationBridge()
           
 
Method Summary
protected  void _do_rpc_batchInvalidate(BatchInvalidation[] invalidations, boolean asynch)
           
protected  void _do_rpc_invalidate_all(String invalidationGroupName, boolean asynch)
           
protected  void _do_rpc_invalidate(String invalidationGroupName, Serializable key, boolean asynch)
           
protected  void _do_rpc_invalidates(String invalidationGroupName, Serializable[] keys, boolean asynch)
           
 void _rpc_batchInvalidate(BatchInvalidation[] invalidations)
           
 void _rpc_invalidate_all(String invalidationGroupName)
           
 void _rpc_invalidate(String invalidationGroupName, Serializable key)
           
 void _rpc_invalidates(String invalidationGroupName, Serializable[] keys)
           
 void batchInvalidate(BatchInvalidation[] invalidations, boolean asynchronous)
           
 String getBridgeName()
          Get the invalidation bridge name.
 org.jboss.ha.framework.interfaces.HAPartition getHAPartition()
          Get the underlying partition used by this service to exchange invalidation messages and discover which caches (i.e., InvalidationGroup) are available.
 InvalidationManagerMBean getInvalidationManager()
          Get the InvalidationManager
 String getPartitionName()
          Gets the name of the partition to be used to exchange invalidation messages and discover which caches (i.e., InvalidationGroup)are available.
protected  boolean groupExistsRemotely(String groupName)
           
 void groupIsDropped(String groupInvalidationName)
           
 void invalidate(String invalidationGroupName, Serializable[] keys, boolean asynchronous)
           
 void invalidate(String invalidationGroupName, Serializable key, boolean asynchronous)
           
 void invalidateAll(String groupName, boolean async)
           
 void keyHasBeenRemoved(String category, Serializable key, Serializable previousContent, boolean locallyModified)
           
 void newGroupCreated(String groupInvalidationName)
           
protected  void publishLocalInvalidationGroups()
           
 void replicantsChanged(String key, List newReplicants, int newReplicantsViewId, boolean merge)
           
 void setBridgeName(String name)
          Set the invalidation bridge name
 void setHAPartition(org.jboss.ha.framework.interfaces.HAPartition clusterPartition)
          Sets the underlying partition used by this service to exchange invalidation messages and discover which caches (i.e., InvalidationGroup) are available
 void setInvalidationManager(InvalidationManagerMBean manager)
          Set the InvalidationManager
 void startService()
           
 void stopService()
           
protected  void updatedBridgedInvalidationGroupsInfo()
           
 void valueHasChanged(String category, Serializable key, Serializable value, boolean locallyModified)
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, stop, unsetKernelControllerContext
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, 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

rpc_invalidate_types

protected static final Class[] rpc_invalidate_types

rpc_invalidates_types

protected static final Class[] rpc_invalidates_types

rpc_invalidate_all_types

protected static final Class[] rpc_invalidate_all_types

rpc_batch_invalidate_types

protected static final Class[] rpc_batch_invalidate_types

partition

protected volatile org.jboss.ha.framework.interfaces.HAPartition partition
The ClusterPartition with which we are associated.


bridgeName

protected volatile String bridgeName

invalMgr

protected volatile InvalidationManagerMBean invalMgr

RPC_HANDLER_NAME

protected String RPC_HANDLER_NAME

invalidationSubscription

protected BridgeInvalidationSubscription invalidationSubscription

localGroups

protected Collection localGroups

bridgedGroups

protected Vector bridgedGroups
Constructor Detail

JGCacheInvalidationBridge

public JGCacheInvalidationBridge()
Method Detail

getHAPartition

public org.jboss.ha.framework.interfaces.HAPartition getHAPartition()
Description copied from interface: JGCacheInvalidationBridgeMBean
Get the underlying partition used by this service to exchange invalidation messages and discover which caches (i.e., InvalidationGroup) are available.

Specified by:
getHAPartition in interface JGCacheInvalidationBridgeMBean
Returns:
the partition

setHAPartition

public void setHAPartition(org.jboss.ha.framework.interfaces.HAPartition clusterPartition)
Description copied from interface: JGCacheInvalidationBridgeMBean
Sets the underlying partition used by this service to exchange invalidation messages and discover which caches (i.e., InvalidationGroup) are available

Specified by:
setHAPartition in interface JGCacheInvalidationBridgeMBean
Parameters:
clusterPartition - the partition

getPartitionName

public String getPartitionName()
Description copied from interface: JGCacheInvalidationBridgeMBean
Gets the name of the partition to be used to exchange invalidation messages and discover which caches (i.e., InvalidationGroup)are available. This is a convenience method as the partition name is an attribute of HAPartition.

Specified by:
getPartitionName in interface JGCacheInvalidationBridgeMBean
Returns:
the name of the partition

getBridgeName

public String getBridgeName()
Description copied from interface: JGCacheInvalidationBridgeMBean
Get the invalidation bridge name.

Specified by:
getBridgeName in interface JGCacheInvalidationBridgeMBean
Returns:
the invalidation bridge name

setBridgeName

public void setBridgeName(String name)
Description copied from interface: JGCacheInvalidationBridgeMBean
Set the invalidation bridge name

Specified by:
setBridgeName in interface JGCacheInvalidationBridgeMBean
Parameters:
name - of the bridge

replicantsChanged

public void replicantsChanged(String key,
                              List newReplicants,
                              int newReplicantsViewId,
                              boolean merge)
Specified by:
replicantsChanged in interface org.jboss.ha.framework.interfaces.DistributedReplicantManager.ReplicantListener

valueHasChanged

public void valueHasChanged(String category,
                            Serializable key,
                            Serializable value,
                            boolean locallyModified)
Specified by:
valueHasChanged in interface org.jboss.ha.framework.interfaces.DistributedState.DSListenerEx

keyHasBeenRemoved

public void keyHasBeenRemoved(String category,
                              Serializable key,
                              Serializable previousContent,
                              boolean locallyModified)
Specified by:
keyHasBeenRemoved in interface org.jboss.ha.framework.interfaces.DistributedState.DSListenerEx

batchInvalidate

public void batchInvalidate(BatchInvalidation[] invalidations,
                            boolean asynchronous)
Specified by:
batchInvalidate in interface InvalidationBridgeListener

invalidate

public void invalidate(String invalidationGroupName,
                       Serializable[] keys,
                       boolean asynchronous)
Specified by:
invalidate in interface InvalidationBridgeListener

invalidate

public void invalidate(String invalidationGroupName,
                       Serializable key,
                       boolean asynchronous)
Specified by:
invalidate in interface InvalidationBridgeListener

invalidateAll

public void invalidateAll(String groupName,
                          boolean async)
Specified by:
invalidateAll in interface InvalidationBridgeListener

newGroupCreated

public void newGroupCreated(String groupInvalidationName)
Specified by:
newGroupCreated in interface InvalidationBridgeListener

groupIsDropped

public void groupIsDropped(String groupInvalidationName)
Specified by:
groupIsDropped in interface InvalidationBridgeListener

getInvalidationManager

public InvalidationManagerMBean getInvalidationManager()
Description copied from interface: JGCacheInvalidationBridgeMBean
Get the InvalidationManager

Specified by:
getInvalidationManager in interface JGCacheInvalidationBridgeMBean

setInvalidationManager

public void setInvalidationManager(InvalidationManagerMBean manager)
Description copied from interface: JGCacheInvalidationBridgeMBean
Set the InvalidationManager

Specified by:
setInvalidationManager in interface JGCacheInvalidationBridgeMBean

startService

public void startService()
                  throws Exception
Overrides:
startService in class ServiceMBeanSupport
Throws:
Exception

stopService

public void stopService()
Overrides:
stopService in class ServiceMBeanSupport

_rpc_invalidate

public void _rpc_invalidate(String invalidationGroupName,
                            Serializable key)

_rpc_invalidates

public void _rpc_invalidates(String invalidationGroupName,
                             Serializable[] keys)

_rpc_invalidate_all

public void _rpc_invalidate_all(String invalidationGroupName)

_rpc_batchInvalidate

public void _rpc_batchInvalidate(BatchInvalidation[] invalidations)

_do_rpc_invalidate

protected void _do_rpc_invalidate(String invalidationGroupName,
                                  Serializable key,
                                  boolean asynch)

_do_rpc_invalidates

protected void _do_rpc_invalidates(String invalidationGroupName,
                                   Serializable[] keys,
                                   boolean asynch)

_do_rpc_invalidate_all

protected void _do_rpc_invalidate_all(String invalidationGroupName,
                                      boolean asynch)

_do_rpc_batchInvalidate

protected void _do_rpc_batchInvalidate(BatchInvalidation[] invalidations,
                                       boolean asynch)

publishLocalInvalidationGroups

protected void publishLocalInvalidationGroups()
                                       throws Exception
Throws:
Exception

updatedBridgedInvalidationGroupsInfo

protected void updatedBridgedInvalidationGroupsInfo()

groupExistsRemotely

protected boolean groupExistsRemotely(String groupName)


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.