KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > invalidation > BridgeInvalidationSubscription


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;
23
24 import java.io.Serializable JavaDoc;
25
26 /**
27  * Every bridge subscribing to a InvalidationManager has access to this interface that
28  * it can used to invalidate messages on the local IM.
29  * @see InvalidationManagerMBean
30  * @see InvalidationBridgeListener
31  * @version $Revision: 37459 $
32  *
33  * <p><b>Revisions:</b>
34  *
35  * <p><b>21 septembre 2002 Sacha Labourey:</b>
36  * <ul>
37  * <li> First implementation </li>
38  * </ul>
39  */

40
41 public interface BridgeInvalidationSubscription
42 {
43    /**
44     * Used to invalidate a single key in a given InvalidationGroup
45     * @param invalidationGroupName Name of the InvalidationGroup for which this invalidation is targeted
46     * @param key Key to be invalidated
47     */

48    public void invalidate (String JavaDoc invalidationGroupName, Serializable JavaDoc key);
49    
50    /**
51     * Invalidate a set of keys in a give InvalidationGRoup
52     * @param invalidationGroupName Name of the InvalidationGroup to which is targeted this invalidation
53     * @param keys Keys to be invalidated
54     */

55    public void invalidate (String JavaDoc invalidationGroupName, Serializable JavaDoc[] keys);
56
57    /**
58     * Invalidate all the entries in the specified group
59     * @param groupName
60     */

61    public void invalidateAll(String JavaDoc groupName);
62    
63    /**
64     * Invalidates a set of keys in a set of InvalidationGroup. It is the responsability
65     * of the InvalidationManager to determine which IG are actually present i.e. the
66     * bridge may transmit BatchInvalidation for IG that are not present locally. The
67     * IM will simply ignore them.
68     * @param invalidations Invalidations to be performed on the local IM instance
69     */

70    public void batchInvalidate (BatchInvalidation[] invalidations);
71    
72    /**
73     * Unregister the current bridge form the InvalidationManager
74     */

75    public void unregister ();
76    
77 }
78
Popular Tags