1 22 package org.jboss.ha.framework.interfaces; 23 24 import java.io.Serializable ; 25 import java.util.Collection ; 26 27 45 public interface DistributedState 46 { 47 52 public interface DSListener 53 { 54 62 public void valueHasChanged (String category, String key, 63 Serializable value, boolean locallyModified); 64 72 public void keyHasBeenRemoved (String category, String key, 73 Serializable previousContent, boolean locallyModified); 74 } 75 76 81 public interface DSListenerEx 82 { 83 91 public void valueHasChanged (String category, Serializable key, 92 Serializable value, boolean locallyModified); 93 101 public void keyHasBeenRemoved (String category, Serializable key, 102 Serializable previousContent, boolean locallyModified); 103 } 104 105 110 public void registerDSListenerEx (String category, DSListenerEx subscriber); 111 116 public void unregisterDSListenerEx (String category, DSListenerEx subscriber); 117 118 123 public void registerDSListener (String category, DSListener subscriber); 124 129 public void unregisterDSListener (String category, DSListener subscriber); 130 131 140 public void set (String category, Serializable key, Serializable value) 141 throws Exception ; 142 143 152 public void set (String category, Serializable key, Serializable value, 153 boolean asynchronousCall) throws Exception ; 154 155 161 public Serializable get (String category, Serializable key); 162 163 167 public Collection getAllCategories (); 168 169 174 public Collection getAllKeys (String category); 175 176 181 public Collection getAllValues (String category); 182 183 190 public Serializable remove (String category, Serializable key) throws Exception ; 191 192 201 public Serializable remove (String category, Serializable key, 202 boolean asynchronousCall) throws Exception ; 203 } 204 | Popular Tags |