1 22 package org.jboss.ha.framework.interfaces; 23 24 import org.jboss.ha.framework.interfaces.DistributedReplicantManager.ReplicantListener; 25 import java.io.Serializable ; 26 import java.util.List ; 27 import java.util.Collection ; 28 29 45 public interface DistributedReplicantManager 46 { 47 51 public interface ReplicantListener 52 { 53 62 public void replicantsChanged(String key, List newReplicants, int newReplicantsViewId); 63 } 64 65 70 public void registerListener(String key, ReplicantListener subscriber); 71 76 public void unregisterListener(String key, ReplicantListener subscriber); 77 78 81 87 public void add(String key, Serializable replicant) throws Exception ; 88 89 94 public void remove(String key) throws Exception ; 95 96 101 public Serializable lookupLocalReplicant(String key); 102 103 110 public List lookupReplicants(String key); 111 112 119 public List lookupReplicantsNodeNames(String key); 120 121 125 public Collection getAllServices (); 126 127 132 public int getReplicantsViewId(String key); 133 134 139 public boolean isMasterReplica (String key); 140 141 } 142 | Popular Tags |