01: /*
02: * JBoss, Home of Professional Open Source.
03: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
04: * as indicated by the @author tags. See the copyright.txt file in the
05: * distribution for a full listing of individual contributors.
06: *
07: * This is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU Lesser General Public License as
09: * 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: import org.jboss.cache.invalidation.BatchInvalidation;
25:
26: /**
27: * <description>
28: *
29: * @see <related>
30: *
31: * @author <a href="mailto:sacha.labourey@cogito-info.ch">Sacha Labourey</a>.
32: * @version $Revision: 57209 $
33: *
34: * <p><b>Revisions:</b>
35: *
36: * <p><b>30. septembre 2002 Sacha Labourey:</b>
37: * <ul>
38: * <li> First implementation </li>
39: * </ul>
40: */
41:
42: public class JMSCacheInvalidationMessage implements
43: java.io.Serializable {
44: static final long serialVersionUID = -8427738967782529274L;
45:
46: // Constants -----------------------------------------------------
47:
48: // Attributes ----------------------------------------------------
49:
50: protected BatchInvalidation[] bis = null;
51: protected java.rmi.dgc.VMID emitter = null;
52: protected String invalidateAllGroupName;
53:
54: // Static --------------------------------------------------------
55:
56: // Constructors --------------------------------------------------
57:
58: public JMSCacheInvalidationMessage(java.rmi.dgc.VMID source,
59: String groupName, java.io.Serializable[] keys) {
60: this .emitter = source;
61: this .bis = new BatchInvalidation[] { new BatchInvalidation(
62: keys, groupName) };
63: }
64:
65: public JMSCacheInvalidationMessage(java.rmi.dgc.VMID source,
66: BatchInvalidation[] invalidations) {
67: this .emitter = source;
68: this .bis = invalidations;
69: }
70:
71: public JMSCacheInvalidationMessage(java.rmi.dgc.VMID source,
72: String groupName) {
73: this .emitter = source;
74: this .invalidateAllGroupName = groupName;
75: }
76:
77: // Public --------------------------------------------------------
78:
79: public BatchInvalidation[] getInvalidations() {
80: if (this .bis == null)
81: this .bis = new BatchInvalidation[0];
82:
83: return this .bis;
84: }
85:
86: // Z implementation ----------------------------------------------
87:
88: // Y overrides ---------------------------------------------------
89:
90: // Package protected ---------------------------------------------
91:
92: // Protected -----------------------------------------------------
93:
94: // Private -------------------------------------------------------
95:
96: // Inner classes -------------------------------------------------
97:
98: }
|