KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > invalidation > bridges > JMSCacheInvalidationBridgeMBean


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.cache.invalidation.bridges;
23
24 /**
25  * Cache invalidation bridge based on JMS.
26  * The list of InvalidationGroup to be bridged is *not* automatically
27  * discovered, thus, all invalidation messages that are locally generated
28  * are forwarded over JMS.
29  * In the future, it should be possible, through a JMX attribute, to list
30  * the InvalidationGroup that should be included/excluded
31  *
32  * @see org.jboss.cache.invalidation.InvalidationManagerMBean
33  *
34  * @author <a HREF="mailto:sacha.labourey@cogito-info.ch">Sacha Labourey</a>.
35  * @version $Revision: 37459 $
36  *
37  * <p><b>Revisions:</b>
38  *
39  * <p><b>28 septembre 2002 Sacha Labourey:</b>
40  * <ul>
41  * <li> First implementation </li>
42  * </ul>
43  */

44
45 public interface JMSCacheInvalidationBridgeMBean
46    extends org.jboss.system.ServiceMBean
47 {
48    public static final int AUTO_ACKNOWLEDGE_MODE = 1;
49    public static final int CLIENT_ACKNOWLEDGE_MODE = 2;
50    public static final int DUPS_OK_ACKNOWLEDGE_MODE = 3;
51    
52    public static final int IN_OUT_BRIDGE_PROPAGATION = 1;
53    public static final int IN_ONLY_BRIDGE_PROPAGATION = 2;
54    public static final int OUT_ONLY_BRIDGE_PROPAGATION = 3;
55    
56    /**
57     * ObjectName of the InvalidationManager to be used. Optional: in this
58     * case, the default InvalidationManager is used.
59     */

60    public String JavaDoc getInvalidationManager ();
61    public void setInvalidationManager (String JavaDoc objectName);
62
63    /**
64     * JNDI name of the JMS connection factory to use for cache invalidations
65     */

66    public String JavaDoc getConnectionFactoryName ();
67    public void setConnectionFactoryName (String JavaDoc factoryName);
68    
69    /**
70     * JNDI name of the Topic to use to send/receive cache invalidations.
71     * Defaults to "topic/JMSCacheInvalidationBridge"
72     */

73    public String JavaDoc getTopicName ();
74    public void setTopicName (String JavaDoc topicName);
75
76    /**
77    * Provider URL to use for JMS access. If null, use the default settings
78    */

79    public String JavaDoc getProviderUrl();
80    public void setProviderUrl(String JavaDoc url);
81    
82    /**
83     * Status of the JMS topic wrt transactions
84     */

85    public boolean isTransacted ();
86    public void setTransacted (boolean isTransacted);
87    
88    /**
89     * Status of the JMS topic wrt messages acknowledgement
90     */

91    public int getAcknowledgeMode ();
92    public void setAcknowledgeMode (int ackMode);
93    
94    /**
95     * Indicates if this bridge should:
96     * 1 - Post local invalidations to the topic and invalidate local caches with invalidations received on the topic
97     * 2 - Only invalidate local caches with invalidations received on the topic but not post anything on the topic
98     * 3 - Only post local invalidations to the topic and not listen to the Topic for invalidation messages
99     */

100    public int getPropagationMode ();
101    public void setPropagationMode (int propagationMode);
102         
103 }
104
Popular Tags