Class 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.
    • 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 interface com.github.ambry.clustermap.VirtualReplicatorCluster
      • getCurrentDataNodeId

        public com.github.ambry.clustermap.DataNodeId getCurrentDataNodeId()
        Specified by:
        getCurrentDataNodeId in interface com.github.ambry.clustermap.VirtualReplicatorCluster
      • participate

        public void participate()
                         throws java.lang.Exception
        Specified by:
        participate in interface com.github.ambry.clustermap.VirtualReplicatorCluster
        Throws:
        java.lang.Exception
      • getAssignedPartitionIds

        public java.util.Collection<? extends com.github.ambry.clustermap.PartitionId> getAssignedPartitionIds()
        Specified by:
        getAssignedPartitionIds in interface com.github.ambry.clustermap.VirtualReplicatorCluster
      • isPartitionAssigned

        public boolean isPartitionAssigned​(java.lang.String partitionPath)
        Specified by:
        isPartitionAssigned in interface com.github.ambry.clustermap.VirtualReplicatorCluster
      • addListener

        public void addListener​(com.github.ambry.clustermap.VirtualReplicatorClusterListener listener)
        Specified by:
        addListener in interface com.github.ambry.clustermap.VirtualReplicatorCluster
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception