Package com.github.ambry.clustermap
Class CloudReplica
- java.lang.Object
-
- com.github.ambry.clustermap.CloudReplica
-
- All Implemented Interfaces:
com.github.ambry.clustermap.ReplicaId
,com.github.ambry.clustermap.Resource
public class CloudReplica extends java.lang.Object implements com.github.ambry.clustermap.ReplicaId
ReplicaId
implementation to use within virtual cloud replicator.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
Cloud_Replica_Keyword
-
Constructor Summary
Constructors Constructor Description CloudReplica(com.github.ambry.clustermap.PartitionId partitionId, com.github.ambry.clustermap.DataNodeId dataNodeId)
Instantiate an CloudReplica instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getCapacityInBytes()
com.github.ambry.clustermap.DataNodeId
getDataNodeId()
com.github.ambry.clustermap.DiskId
getDiskId()
java.lang.String
getMountPath()
com.github.ambry.clustermap.PartitionId
getPartitionId()
java.util.List<com.github.ambry.clustermap.ReplicaId>
getPeerReplicaIds()
java.lang.String
getReplicaPath()
com.github.ambry.clustermap.ReplicaType
getReplicaType()
org.json.JSONObject
getSnapshot()
boolean
isDown()
boolean
isSealed()
void
markDiskDown()
void
markDiskUp()
java.lang.String
toString()
-
-
-
Field Detail
-
Cloud_Replica_Keyword
public static final java.lang.String Cloud_Replica_Keyword
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CloudReplica
public CloudReplica(com.github.ambry.clustermap.PartitionId partitionId, com.github.ambry.clustermap.DataNodeId dataNodeId)
Instantiate an CloudReplica instance.- Parameters:
partitionId
- thePartitionId
of which this is a replica.dataNodeId
- which hosts this replica.
-
-
Method Detail
-
getPartitionId
public com.github.ambry.clustermap.PartitionId getPartitionId()
- Specified by:
getPartitionId
in interfacecom.github.ambry.clustermap.ReplicaId
-
getDataNodeId
public com.github.ambry.clustermap.DataNodeId getDataNodeId()
- Specified by:
getDataNodeId
in interfacecom.github.ambry.clustermap.ReplicaId
-
getMountPath
public java.lang.String getMountPath()
- Specified by:
getMountPath
in interfacecom.github.ambry.clustermap.ReplicaId
-
getReplicaPath
public java.lang.String getReplicaPath()
- Specified by:
getReplicaPath
in interfacecom.github.ambry.clustermap.ReplicaId
-
getPeerReplicaIds
public java.util.List<com.github.ambry.clustermap.ReplicaId> getPeerReplicaIds()
- Specified by:
getPeerReplicaIds
in interfacecom.github.ambry.clustermap.ReplicaId
-
getCapacityInBytes
public long getCapacityInBytes()
- Specified by:
getCapacityInBytes
in interfacecom.github.ambry.clustermap.ReplicaId
-
isSealed
public boolean isSealed()
- Specified by:
isSealed
in interfacecom.github.ambry.clustermap.ReplicaId
-
getSnapshot
public org.json.JSONObject getSnapshot()
- Specified by:
getSnapshot
in interfacecom.github.ambry.clustermap.Resource
-
getDiskId
public com.github.ambry.clustermap.DiskId getDiskId()
- Specified by:
getDiskId
in interfacecom.github.ambry.clustermap.ReplicaId
-
isDown
public boolean isDown()
- Specified by:
isDown
in interfacecom.github.ambry.clustermap.ReplicaId
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
markDiskDown
public void markDiskDown()
- Specified by:
markDiskDown
in interfacecom.github.ambry.clustermap.ReplicaId
-
markDiskUp
public void markDiskUp()
- Specified by:
markDiskUp
in interfacecom.github.ambry.clustermap.ReplicaId
-
getReplicaType
public com.github.ambry.clustermap.ReplicaType getReplicaType()
- Specified by:
getReplicaType
in interfacecom.github.ambry.clustermap.ReplicaId
-
-