Class 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 the StaticClusterManager and ClusterParticipant. 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()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 - the ClusterMapConfig 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 interface com.github.ambry.clustermap.ClusterAgentsFactory
      • getClusterParticipants

        public java.util.List<com.github.ambry.clustermap.ClusterParticipant> getClusterParticipants()
                                                                                              throws java.io.IOException
        Specified by:
        getClusterParticipants in interface com.github.ambry.clustermap.ClusterAgentsFactory
        Throws:
        java.io.IOException