Package com.github.ambry.cloud
Class StaticVcrCluster
- java.lang.Object
-
- com.github.ambry.cloud.StaticVcrCluster
-
- All Implemented Interfaces:
com.github.ambry.clustermap.VirtualReplicatorCluster
,java.lang.AutoCloseable
public class StaticVcrCluster extends java.lang.Object implements com.github.ambry.clustermap.VirtualReplicatorCluster
VCR Cluster based on static partition assignment.
-
-
Constructor Summary
Constructors Constructor Description StaticVcrCluster(com.github.ambry.config.CloudConfig cloudConfig, com.github.ambry.config.ClusterMapConfig clusterMapConfig, com.github.ambry.clustermap.ClusterMap clusterMap)
Construct the static VCR cluster.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addListener(com.github.ambry.clustermap.VirtualReplicatorClusterListener listener)
void
close()
java.util.List<? extends com.github.ambry.clustermap.DataNodeId>
getAllDataNodeIds()
java.util.Collection<? extends com.github.ambry.clustermap.PartitionId>
getAssignedPartitionIds()
com.github.ambry.clustermap.DataNodeId
getCurrentDataNodeId()
boolean
isPartitionAssigned(java.lang.String partitionPath)
void
participate()
-
-
-
Constructor Detail
-
StaticVcrCluster
public StaticVcrCluster(com.github.ambry.config.CloudConfig cloudConfig, com.github.ambry.config.ClusterMapConfig clusterMapConfig, com.github.ambry.clustermap.ClusterMap clusterMap)
Construct the static VCR cluster.- Parameters:
cloudConfig
- The cloud configuration to use.clusterMapConfig
- The clustermap configuration to use.clusterMap
- The clustermap to use.
-
-
Method Detail
-
getAllDataNodeIds
public java.util.List<? extends com.github.ambry.clustermap.DataNodeId> getAllDataNodeIds()
- Specified by:
getAllDataNodeIds
in interfacecom.github.ambry.clustermap.VirtualReplicatorCluster
-
getCurrentDataNodeId
public com.github.ambry.clustermap.DataNodeId getCurrentDataNodeId()
- Specified by:
getCurrentDataNodeId
in interfacecom.github.ambry.clustermap.VirtualReplicatorCluster
-
participate
public void participate() throws java.lang.Exception
- Specified by:
participate
in interfacecom.github.ambry.clustermap.VirtualReplicatorCluster
- Throws:
java.lang.Exception
-
getAssignedPartitionIds
public java.util.Collection<? extends com.github.ambry.clustermap.PartitionId> getAssignedPartitionIds()
- Specified by:
getAssignedPartitionIds
in interfacecom.github.ambry.clustermap.VirtualReplicatorCluster
-
isPartitionAssigned
public boolean isPartitionAssigned(java.lang.String partitionPath)
- Specified by:
isPartitionAssigned
in interfacecom.github.ambry.clustermap.VirtualReplicatorCluster
-
addListener
public void addListener(com.github.ambry.clustermap.VirtualReplicatorClusterListener listener)
- Specified by:
addListener
in interfacecom.github.ambry.clustermap.VirtualReplicatorCluster
-
close
public void close() throws java.lang.Exception
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.lang.Exception
-
-