1 22 package org.jboss.ha.framework.interfaces; 23 24 import java.io.Serializable ; 25 import java.util.Vector ; 26 import java.util.ArrayList ; 27 28 40 41 public interface HAPartition 42 { 43 58 public String getNodeName(); 59 64 public String getPartitionName(); 65 66 70 public DistributedReplicantManager getDistributedReplicantManager(); 71 75 public DistributedState getDistributedStateService (); 76 77 92 public void registerRPCHandler(String serviceName, Object handler); 93 98 public void unregisterRPCHandler(String serviceName, Object subscriber); 99 100 114 public ArrayList callMethodOnCluster(String serviceName, String methodName, 115 Object [] args, Class [] types, boolean excludeSelf) throws Exception ; 116 117 118 128 public ArrayList callMethodOnCluster(String serviceName, String methodName, 129 Object [] args, boolean excludeSelf) throws Exception ; 130 131 144 public void callAsynchMethodOnCluster (String serviceName, String methodName, 145 Object [] args, Class [] types, boolean excludeSelf) throws Exception ; 146 147 161 public ArrayList callMethodOnCoordinatorNode(String serviceName, String methodName, 162 Object [] args, Class [] types, boolean excludeSelf) throws Exception ; 163 164 165 174 public void callAsynchMethodOnCluster (String serviceName, String methodName, 175 Object [] args, boolean excludeSelf) throws Exception ; 176 177 178 185 190 public interface HAPartitionStateTransfer 191 { 192 196 public Serializable getCurrentState (); 197 201 public void setCurrentState(Serializable newState); 202 } 203 204 209 public void subscribeToStateTransferEvents (String serviceName, HAPartition.HAPartitionStateTransfer subscriber); 210 215 public void unsubscribeFromStateTransferEvents (String serviceName, HAPartition.HAPartitionStateTransfer subscriber); 216 217 228 public interface HAMembershipListener 229 { 230 239 public void membershipChanged(Vector deadMembers, Vector newMembers, Vector allMembers); 240 } 241 242 247 public interface AsynchHAMembershipListener extends HAMembershipListener 248 { 249 } 251 252 public interface HAMembershipExtendedListener extends HAPartition.HAMembershipListener 253 { 254 263 public void membershipChangedDuringMerge(Vector deadMembers, Vector newMembers, 264 Vector allMembers, Vector originatingGroups); 265 } 266 267 272 public interface AsynchHAMembershipExtendedListener extends HAMembershipExtendedListener 273 { 274 } 276 277 281 public void registerMembershipListener(HAMembershipListener listener); 282 286 public void unregisterMembershipListener(HAMembershipListener listener); 287 299 public boolean getAllowSynchronousMembershipNotifications(); 300 312 public void setAllowSynchronousMembershipNotifications(boolean allowSync); 313 314 319 public long getCurrentViewId(); 320 324 public Vector getCurrentView (); 325 326 332 public ClusterNode[] getClusterNodes (); 333 334 338 public ClusterNode getClusterNode (); 339 } | Popular Tags |