Package com.github.ambry.clustermap
Interface ClusterAgentsFactory
-
public interface ClusterAgentsFactory
A factory interface to get cluster agents such asClusterMap
andClusterParticipant
. Each type of agents should be constructed at most once, and only on demand.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClusterMap
getClusterMap()
Construct and return the reference or return the reference to the previously constructedClusterMap
java.util.List<ClusterParticipant>
getClusterParticipants()
Construct and return the references or return the references to the previously constructedClusterParticipant
(s).
-
-
-
Method Detail
-
getClusterMap
ClusterMap getClusterMap() throws java.io.IOException
Construct and return the reference or return the reference to the previously constructedClusterMap
- Throws:
java.io.IOException
-
getClusterParticipants
java.util.List<ClusterParticipant> getClusterParticipants() throws java.io.IOException
Construct and return the references or return the references to the previously constructedClusterParticipant
(s). We extend this method to support multiple participants on same node. In some special cases (i.e. migrating cluster to another Zookeeper), we require a data node to participate into multiple ZK clusters and each participant interacts with corresponding ZK independently.- Returns:
- a list of
ClusterParticipant
(s) on current node. - Throws:
java.io.IOException
-
-