Package com.github.ambry.clustermap
Class CloudDataNode
- java.lang.Object
-
- com.github.ambry.clustermap.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.
-
-
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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDatacenterName()
java.lang.String
getHostname()
int
getHttp2Port()
int
getPort()
com.github.ambry.network.Port
getPortToConnectTo()
java.lang.String
getRackId()
org.json.JSONObject
getSnapshot()
int
getSSLPort()
com.github.ambry.clustermap.HardwareState
getState()
long
getXid()
boolean
hasHttp2Port()
boolean
hasSSLPort()
java.lang.String
toString()
-
-
-
Constructor Detail
-
CloudDataNode
public CloudDataNode(com.github.ambry.config.CloudConfig cloudConfig, com.github.ambry.config.ClusterMapConfig clusterMapConfig)
Instantiate a CloudDataNode object.- Parameters:
cloudConfig
- theCloudConfig
to use.clusterMapConfig
- theClusterMapConfig
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 interfacecom.github.ambry.clustermap.DataNodeId
-
getPort
public int getPort()
- Specified by:
getPort
in interfacecom.github.ambry.clustermap.DataNodeId
-
hasSSLPort
public boolean hasSSLPort()
- Specified by:
hasSSLPort
in interfacecom.github.ambry.clustermap.DataNodeId
-
getSSLPort
public int getSSLPort()
- Specified by:
getSSLPort
in interfacecom.github.ambry.clustermap.DataNodeId
-
hasHttp2Port
public boolean hasHttp2Port()
- Specified by:
hasHttp2Port
in interfacecom.github.ambry.clustermap.DataNodeId
-
getHttp2Port
public int getHttp2Port()
- Specified by:
getHttp2Port
in interfacecom.github.ambry.clustermap.DataNodeId
-
getPortToConnectTo
public com.github.ambry.network.Port getPortToConnectTo()
- Specified by:
getPortToConnectTo
in interfacecom.github.ambry.clustermap.DataNodeId
-
getState
public com.github.ambry.clustermap.HardwareState getState()
- Specified by:
getState
in interfacecom.github.ambry.clustermap.DataNodeId
-
getDatacenterName
public java.lang.String getDatacenterName()
- Specified by:
getDatacenterName
in interfacecom.github.ambry.clustermap.DataNodeId
-
getRackId
public java.lang.String getRackId()
- Specified by:
getRackId
in interfacecom.github.ambry.clustermap.DataNodeId
-
getXid
public long getXid()
- Specified by:
getXid
in interfacecom.github.ambry.clustermap.DataNodeId
-
getSnapshot
public org.json.JSONObject getSnapshot()
- Specified by:
getSnapshot
in interfacecom.github.ambry.clustermap.Resource
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-