Class 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 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 - the PartitionId 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 interface com.github.ambry.clustermap.ReplicaId
      • getDataNodeId

        public com.github.ambry.clustermap.DataNodeId getDataNodeId()
        Specified by:
        getDataNodeId in interface com.github.ambry.clustermap.ReplicaId
      • getMountPath

        public java.lang.String getMountPath()
        Specified by:
        getMountPath in interface com.github.ambry.clustermap.ReplicaId
      • getReplicaPath

        public java.lang.String getReplicaPath()
        Specified by:
        getReplicaPath in interface com.github.ambry.clustermap.ReplicaId
      • getPeerReplicaIds

        public java.util.List<com.github.ambry.clustermap.ReplicaId> getPeerReplicaIds()
        Specified by:
        getPeerReplicaIds in interface com.github.ambry.clustermap.ReplicaId
      • getCapacityInBytes

        public long getCapacityInBytes()
        Specified by:
        getCapacityInBytes in interface com.github.ambry.clustermap.ReplicaId
      • isSealed

        public boolean isSealed()
        Specified by:
        isSealed in interface com.github.ambry.clustermap.ReplicaId
      • getSnapshot

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

        public com.github.ambry.clustermap.DiskId getDiskId()
        Specified by:
        getDiskId in interface com.github.ambry.clustermap.ReplicaId
      • isDown

        public boolean isDown()
        Specified by:
        isDown in interface com.github.ambry.clustermap.ReplicaId
      • toString

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

        public void markDiskDown()
        Specified by:
        markDiskDown in interface com.github.ambry.clustermap.ReplicaId
      • markDiskUp

        public void markDiskUp()
        Specified by:
        markDiskUp in interface com.github.ambry.clustermap.ReplicaId
      • getReplicaType

        public com.github.ambry.clustermap.ReplicaType getReplicaType()
        Specified by:
        getReplicaType in interface com.github.ambry.clustermap.ReplicaId