Package com.github.ambry.clustermap
Class StaticClusterAgentsFactory
- java.lang.Object
-
- com.github.ambry.clustermap.StaticClusterAgentsFactory
-
- All Implemented Interfaces:
com.github.ambry.clustermap.ClusterAgentsFactory
public class StaticClusterAgentsFactory extends java.lang.Object implements com.github.ambry.clustermap.ClusterAgentsFactory
A class used to create theStaticClusterManager
andClusterParticipant
. Only one instance of each type of objects will ever be created by this factory.
-
-
Constructor Summary
Constructors Constructor Description StaticClusterAgentsFactory(com.github.ambry.config.ClusterMapConfig clusterMapConfig, java.lang.String hardwareLayoutFilePath, java.lang.String partitionLayoutFilePath)
Instantiate an instance of this factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.github.ambry.clustermap.StaticClusterManager
getClusterMap()
java.util.List<com.github.ambry.clustermap.ClusterParticipant>
getClusterParticipants()
-
-
-
Constructor Detail
-
StaticClusterAgentsFactory
public StaticClusterAgentsFactory(com.github.ambry.config.ClusterMapConfig clusterMapConfig, java.lang.String hardwareLayoutFilePath, java.lang.String partitionLayoutFilePath) throws org.json.JSONException, java.io.IOException
Instantiate an instance of this factory.- Parameters:
clusterMapConfig
- theClusterMapConfig
to use.hardwareLayoutFilePath
- the path to the hardware layout file.partitionLayoutFilePath
- the path to the partition layout file.- Throws:
org.json.JSONException
- if a JSON error is encountered while parsing the layout files.java.io.IOException
- if an I/O error is encountered accessing or reading the layout files.
-
-
Method Detail
-
getClusterMap
public com.github.ambry.clustermap.StaticClusterManager getClusterMap()
- Specified by:
getClusterMap
in interfacecom.github.ambry.clustermap.ClusterAgentsFactory
-
getClusterParticipants
public java.util.List<com.github.ambry.clustermap.ClusterParticipant> getClusterParticipants() throws java.io.IOException
- Specified by:
getClusterParticipants
in interfacecom.github.ambry.clustermap.ClusterAgentsFactory
- Throws:
java.io.IOException
-
-