Package com.github.ambry.clustermap
Class RecoveryTestClusterAgentsFactory
- java.lang.Object
-
- com.github.ambry.clustermap.RecoveryTestClusterAgentsFactory
-
- All Implemented Interfaces:
com.github.ambry.clustermap.ClusterAgentsFactory
public class RecoveryTestClusterAgentsFactory extends java.lang.Object implements com.github.ambry.clustermap.ClusterAgentsFactory
A factory class to constructRecoveryTestClusterManager
and a no opClusterParticipant
. Only one instance of each type of objects will ever be created by this factory.
-
-
Constructor Summary
Constructors Constructor Description RecoveryTestClusterAgentsFactory(com.github.ambry.config.ClusterMapConfig clusterMapConfig, java.lang.String hardwareLayoutFilePath, java.lang.String partitionLayoutFilePath)
Create an instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecoveryTestClusterManager
getClusterMap()
Create and return aRecoveryTestClusterManager
.java.util.List<com.github.ambry.clustermap.ClusterParticipant>
getClusterParticipants()
-
-
-
Constructor Detail
-
RecoveryTestClusterAgentsFactory
public RecoveryTestClusterAgentsFactory(com.github.ambry.config.ClusterMapConfig clusterMapConfig, java.lang.String hardwareLayoutFilePath, java.lang.String partitionLayoutFilePath) throws org.json.JSONException
Create an instance of this class.- 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 there is an exception parsing the layout files.
-
-
Method Detail
-
getClusterMap
public RecoveryTestClusterManager getClusterMap() throws java.io.IOException
Create and return aRecoveryTestClusterManager
.- Specified by:
getClusterMap
in interfacecom.github.ambry.clustermap.ClusterAgentsFactory
- Returns:
- the constructed
RecoveryTestClusterManager
. - Throws:
java.io.IOException
- if constructing the underlyingStaticClusterManager
or theHelixClusterManager
throws an Exception.
-
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
-
-