001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.cache.invalidation.bridges;
023:
024: /**
025: * Cache invalidation bridge based on JMS.
026: * The list of InvalidationGroup to be bridged is *not* automatically
027: * discovered, thus, all invalidation messages that are locally generated
028: * are forwarded over JMS.
029: * In the future, it should be possible, through a JMX attribute, to list
030: * the InvalidationGroup that should be included/excluded
031: *
032: * @see org.jboss.cache.invalidation.InvalidationManagerMBean
033: *
034: * @author <a href="mailto:sacha.labourey@cogito-info.ch">Sacha Labourey</a>.
035: * @version $Revision: 57209 $
036: *
037: * <p><b>Revisions:</b>
038: *
039: * <p><b>28 septembre 2002 Sacha Labourey:</b>
040: * <ul>
041: * <li> First implementation </li>
042: * </ul>
043: */
044:
045: public interface JMSCacheInvalidationBridgeMBean extends
046: org.jboss.system.ServiceMBean {
047: public static final int AUTO_ACKNOWLEDGE_MODE = 1;
048: public static final int CLIENT_ACKNOWLEDGE_MODE = 2;
049: public static final int DUPS_OK_ACKNOWLEDGE_MODE = 3;
050:
051: public static final int IN_OUT_BRIDGE_PROPAGATION = 1;
052: public static final int IN_ONLY_BRIDGE_PROPAGATION = 2;
053: public static final int OUT_ONLY_BRIDGE_PROPAGATION = 3;
054:
055: /**
056: * ObjectName of the InvalidationManager to be used. Optional: in this
057: * case, the default InvalidationManager is used.
058: */
059: public String getInvalidationManager();
060:
061: public void setInvalidationManager(String objectName);
062:
063: /**
064: * JNDI name of the JMS connection factory to use for cache invalidations
065: */
066: public String getConnectionFactoryName();
067:
068: public void setConnectionFactoryName(String factoryName);
069:
070: /**
071: * JNDI name of the Topic to use to send/receive cache invalidations.
072: * Defaults to "topic/JMSCacheInvalidationBridge"
073: */
074: public String getTopicName();
075:
076: public void setTopicName(String topicName);
077:
078: /**
079: * Provider URL to use for JMS access. If null, use the default settings
080: */
081: public String getProviderUrl();
082:
083: public void setProviderUrl(String url);
084:
085: /**
086: * Status of the JMS topic wrt transactions
087: */
088: public boolean isTransacted();
089:
090: public void setTransacted(boolean isTransacted);
091:
092: /**
093: * Status of the JMS topic wrt messages acknowledgement
094: */
095: public int getAcknowledgeMode();
096:
097: public void setAcknowledgeMode(int ackMode);
098:
099: /**
100: * Indicates if this bridge should:
101: * 1 - Post local invalidations to the topic and invalidate local caches with invalidations received on the topic
102: * 2 - Only invalidate local caches with invalidations received on the topic but not post anything on the topic
103: * 3 - Only post local invalidations to the topic and not listen to the Topic for invalidation messages
104: */
105: public int getPropagationMode();
106:
107: public void setPropagationMode(int propagationMode);
108:
109: }
|