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.
    • 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.List<? extends com.github.ambry.clustermap.PartitionId> getAssignedPartitionIds()  
      com.github.ambry.clustermap.DataNodeId getCurrentDataNodeId()  
      void participate()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.List<? extends com.github.ambry.clustermap.PartitionId> getAssignedPartitionIds()
        Specified by:
        getAssignedPartitionIds 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