|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.cache.invalidation.bridges.JMSCacheInvalidationBridge
public class JMSCacheInvalidationBridge
JMS implementation of a cache invalidation bridge Based on previous code of Bill Burke based on interceptors
Revisions:
28 septembre 2002 Sacha Labourey:
InvalidationManagerMBean| Field Summary | |
|---|---|
protected int |
acknowledgeMode
|
protected javax.jms.TopicConnection |
conn
|
protected String |
connectionFactoryName
|
protected String |
invalidationManagerName
|
protected BridgeInvalidationSubscription |
invalidationSubscription
|
protected InvalidationManagerMBean |
invalMgr
|
static String |
JMS_CACHE_INVALIDATION_BRIDGE
|
protected int |
propagationMode
|
protected String |
providerUrl
|
protected javax.jms.TopicPublisher |
pub
|
protected boolean |
publishingAuthorized
|
protected VMID |
serviceId
|
protected javax.jms.TopicSession |
session
|
protected javax.jms.TopicSubscriber |
subscriber
|
protected javax.jms.Topic |
topic
|
protected String |
topicName
|
protected boolean |
transacted
|
| Fields inherited from class org.jboss.system.ServiceMBeanSupport |
|---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from interface org.jboss.cache.invalidation.bridges.JMSCacheInvalidationBridgeMBean |
|---|
AUTO_ACKNOWLEDGE_MODE, CLIENT_ACKNOWLEDGE_MODE, DUPS_OK_ACKNOWLEDGE_MODE, IN_ONLY_BRIDGE_PROPAGATION, IN_OUT_BRIDGE_PROPAGATION, OUT_ONLY_BRIDGE_PROPAGATION |
| 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 | |
|---|---|
JMSCacheInvalidationBridge()
|
|
| Method Summary | |
|---|---|
void |
batchInvalidate(BatchInvalidation[] invalidations,
boolean asynchronous)
Called when a set of invalidations, concerning more than one IG, should be forwarded accross the bridge. |
int |
getAcknowledgeMode()
Status of the JMS topic wrt messages acknowledgement |
String |
getConnectionFactoryName()
JNDI name of the JMS connection factory to use for cache invalidations |
protected InitialContext |
getInitialContext()
|
String |
getInvalidationManager()
ObjectName of the InvalidationManager to be used. |
int |
getPropagationMode()
Indicates if this bridge should: 1 - Post local invalidations to the topic and invalidate local caches with invalidations received on the topic 2 - Only invalidate local caches with invalidations received on the topic but not post anything on the topic 3 - Only post local invalidations to the topic and not listen to the Topic for invalidation messages |
String |
getProviderUrl()
Provider URL to use for JMS access. |
protected javax.jms.TopicPublisher |
getPublisher()
|
protected javax.jms.TopicSession |
getSession()
|
String |
getTopicName()
JNDI name of the Topic to use to send/receive cache invalidations. |
void |
groupIsDropped(String groupInvalidationName)
Called when an InvocationGroup is dropped (because no cache and invalider are using it anymore). |
void |
invalidate(String invalidationGroupName,
Serializable[] keys,
boolean asynchronous)
Called when a set of invalidations, concerning a single IG, should be forwarded accross the bridge. |
void |
invalidate(String invalidationGroupName,
Serializable key,
boolean asynchronous)
Called when a single invalidation, concerning a single IG, should be forwarded accross the bridge. |
void |
invalidateAll(String groupName,
boolean asynchronous)
Issues invalidate all event to other nodes. |
boolean |
isTransacted()
Status of the JMS topic wrt transactions |
void |
newGroupCreated(String groupInvalidationName)
Called when an InvocationGroup is created. |
void |
onMessage(javax.jms.Message msg)
|
protected void |
sendJMSInvalidationEvent(JMSCacheInvalidationMessage invalidationMsg)
|
void |
setAcknowledgeMode(int ackMode)
|
void |
setConnectionFactoryName(String factoryName)
|
void |
setInvalidationManager(String objectName)
|
void |
setPropagationMode(int propMode)
|
void |
setProviderUrl(String providerUrl)
|
void |
setTopicName(String topicName)
|
void |
setTransacted(boolean isTransacted)
|
protected void |
startService()
|
protected void |
stopService()
|
| 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, postDeregister, postRegister, preDeregister, preRegister, start, stop |
| 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 |
|---|
public static final String JMS_CACHE_INVALIDATION_BRIDGE
protected InvalidationManagerMBean invalMgr
protected BridgeInvalidationSubscription invalidationSubscription
protected String invalidationManagerName
protected boolean publishingAuthorized
protected String connectionFactoryName
protected String topicName
protected boolean transacted
protected int acknowledgeMode
protected int propagationMode
protected VMID serviceId
protected javax.jms.TopicConnection conn
protected javax.jms.TopicSession session
protected javax.jms.Topic topic
protected javax.jms.TopicSubscriber subscriber
protected javax.jms.TopicPublisher pub
protected String providerUrl
| Constructor Detail |
|---|
public JMSCacheInvalidationBridge()
| Method Detail |
|---|
public String getInvalidationManager()
JMSCacheInvalidationBridgeMBean
getInvalidationManager in interface JMSCacheInvalidationBridgeMBeanpublic void setInvalidationManager(String objectName)
setInvalidationManager in interface JMSCacheInvalidationBridgeMBeanpublic String getConnectionFactoryName()
JMSCacheInvalidationBridgeMBean
getConnectionFactoryName in interface JMSCacheInvalidationBridgeMBeanpublic void setConnectionFactoryName(String factoryName)
setConnectionFactoryName in interface JMSCacheInvalidationBridgeMBeanpublic String getTopicName()
JMSCacheInvalidationBridgeMBean
getTopicName in interface JMSCacheInvalidationBridgeMBeanpublic void setTopicName(String topicName)
setTopicName in interface JMSCacheInvalidationBridgeMBeanpublic String getProviderUrl()
JMSCacheInvalidationBridgeMBean
getProviderUrl in interface JMSCacheInvalidationBridgeMBeanpublic void setProviderUrl(String providerUrl)
setProviderUrl in interface JMSCacheInvalidationBridgeMBeanpublic boolean isTransacted()
JMSCacheInvalidationBridgeMBean
isTransacted in interface JMSCacheInvalidationBridgeMBeanpublic void setTransacted(boolean isTransacted)
setTransacted in interface JMSCacheInvalidationBridgeMBeanpublic int getAcknowledgeMode()
JMSCacheInvalidationBridgeMBean
getAcknowledgeMode in interface JMSCacheInvalidationBridgeMBeanpublic void setAcknowledgeMode(int ackMode)
setAcknowledgeMode in interface JMSCacheInvalidationBridgeMBeanpublic int getPropagationMode()
JMSCacheInvalidationBridgeMBean
getPropagationMode in interface JMSCacheInvalidationBridgeMBeanpublic void setPropagationMode(int propMode)
setPropagationMode in interface JMSCacheInvalidationBridgeMBeanpublic void onMessage(javax.jms.Message msg)
onMessage in interface javax.jms.MessageListener
public void batchInvalidate(BatchInvalidation[] invalidations,
boolean asynchronous)
InvalidationBridgeListener
batchInvalidate in interface InvalidationBridgeListenerinvalidations - BatchInvalidation messages containing invalidationsasynchronous - Determine the best-effort indication to be used to communicate invalidations
public void invalidate(String invalidationGroupName,
Serializable[] keys,
boolean asynchronous)
InvalidationBridgeListener
invalidate in interface InvalidationBridgeListenerinvalidationGroupName - Name of the InvalidationGroup to which is linked the invalidation messagekeys - Keys to be invalidatedasynchronous - Best effort communication setting
public void invalidate(String invalidationGroupName,
Serializable key,
boolean asynchronous)
InvalidationBridgeListener
invalidate in interface InvalidationBridgeListenerinvalidationGroupName - InvalidationGroup namekey - Key to be invalidatedasynchronous - Best effort communication setting
public void invalidateAll(String groupName,
boolean asynchronous)
InvalidationBridgeListener
invalidateAll in interface InvalidationBridgeListenergroupName - group's nameasynchronous - modepublic void newGroupCreated(String groupInvalidationName)
InvalidationBridgeListener
newGroupCreated in interface InvalidationBridgeListenergroupInvalidationName - Name of the InvalidationGroup just being createdpublic void groupIsDropped(String groupInvalidationName)
InvalidationBridgeListener
groupIsDropped in interface InvalidationBridgeListenergroupInvalidationName - Name of the InvalidationGroup being dropped
protected void startService()
throws Exception
startService in class org.jboss.system.ServiceMBeanSupportExceptionprotected void stopService()
stopService in class org.jboss.system.ServiceMBeanSupportprotected javax.jms.TopicSession getSession()
protected javax.jms.TopicPublisher getPublisher()
protected void sendJMSInvalidationEvent(JMSCacheInvalidationMessage invalidationMsg)
protected InitialContext getInitialContext()
throws NamingException
NamingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||