Class CloudDataNode

  • All Implemented Interfaces:
    com.github.ambry.clustermap.DataNodeId, com.github.ambry.clustermap.Resource, java.lang.Comparable<com.github.ambry.clustermap.DataNodeId>

    public class CloudDataNode
    extends java.lang.Object
    implements com.github.ambry.clustermap.DataNodeId
    DataNodeId implementation to use within VCR cluster.
    • Field Summary

      • Fields inherited from interface com.github.ambry.clustermap.DataNodeId

        UNKNOWN_PORT
    • Constructor Summary

      Constructors 
      Constructor Description
      CloudDataNode​(com.github.ambry.config.CloudConfig cloudConfig, com.github.ambry.config.ClusterMapConfig clusterMapConfig)
      Instantiate a CloudDataNode object.
      CloudDataNode​(java.lang.String hostName, com.github.ambry.network.Port plainTextPort, com.github.ambry.network.Port sslPort, com.github.ambry.network.Port http2Port, java.lang.String dataCenterName, com.github.ambry.config.ClusterMapConfig clusterMapConfig)
      Instantiate a CloudDataNode object from hostname, port and datacentername.
    • Constructor Detail

      • CloudDataNode

        public CloudDataNode​(com.github.ambry.config.CloudConfig cloudConfig,
                             com.github.ambry.config.ClusterMapConfig clusterMapConfig)
        Instantiate a CloudDataNode object.
        Parameters:
        cloudConfig - the CloudConfig to use.
        clusterMapConfig - the ClusterMapConfig to use.
      • CloudDataNode

        public CloudDataNode​(java.lang.String hostName,
                             com.github.ambry.network.Port plainTextPort,
                             com.github.ambry.network.Port sslPort,
                             com.github.ambry.network.Port http2Port,
                             java.lang.String dataCenterName,
                             com.github.ambry.config.ClusterMapConfig clusterMapConfig)
        Instantiate a CloudDataNode object from hostname, port and datacentername.
    • Method Detail

      • getHostname

        public java.lang.String getHostname()
        Specified by:
        getHostname in interface com.github.ambry.clustermap.DataNodeId
      • getPort

        public int getPort()
        Specified by:
        getPort in interface com.github.ambry.clustermap.DataNodeId
      • hasSSLPort

        public boolean hasSSLPort()
        Specified by:
        hasSSLPort in interface com.github.ambry.clustermap.DataNodeId
      • getSSLPort

        public int getSSLPort()
        Specified by:
        getSSLPort in interface com.github.ambry.clustermap.DataNodeId
      • hasHttp2Port

        public boolean hasHttp2Port()
        Specified by:
        hasHttp2Port in interface com.github.ambry.clustermap.DataNodeId
      • getHttp2Port

        public int getHttp2Port()
        Specified by:
        getHttp2Port in interface com.github.ambry.clustermap.DataNodeId
      • getPortToConnectTo

        public com.github.ambry.network.Port getPortToConnectTo()
        Specified by:
        getPortToConnectTo in interface com.github.ambry.clustermap.DataNodeId
      • getState

        public com.github.ambry.clustermap.HardwareState getState()
        Specified by:
        getState in interface com.github.ambry.clustermap.DataNodeId
      • getDatacenterName

        public java.lang.String getDatacenterName()
        Specified by:
        getDatacenterName in interface com.github.ambry.clustermap.DataNodeId
      • getRackId

        public java.lang.String getRackId()
        Specified by:
        getRackId in interface com.github.ambry.clustermap.DataNodeId
      • getXid

        public long getXid()
        Specified by:
        getXid in interface com.github.ambry.clustermap.DataNodeId
      • getSnapshot

        public org.json.JSONObject getSnapshot()
        Specified by:
        getSnapshot in interface com.github.ambry.clustermap.Resource
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object