Interface ReplicaId

  • All Superinterfaces:
    Resource

    public interface ReplicaId
    extends Resource
    A ReplicaId is part of some PartitionId. The durable state of a ReplicaId is stored in a specific path ("replica path") on a specific device (identified by its "mount path") on a DataNodeId.
    • Method Detail

      • getPartitionId

        PartitionId getPartitionId()
        Gets the PartitionId of which this ReplicaId is a member.
        Returns:
        PartitionId of which this ReplicaId is a member.
      • getDataNodeId

        DataNodeId getDataNodeId()
        Gets the DataNodeId that stores this ReplicaId.
        Returns:
        DataNodeId that stores this ReplicaId.
      • getMountPath

        java.lang.String getMountPath()
        Gets the absolute path to the mounted device that stores this ReplicaId.
        Returns:
        absolute mount path.
      • getReplicaPath

        java.lang.String getReplicaPath()
        Gets the absolute path to the directory in which this ReplicaId's files are stored on this DataNodeId. The replica path is the mount path followed by a unique path for this ReplicaId.
        Returns:
        absolute replica path.
      • getPeerReplicaIds

        java.util.List<? extends ReplicaId> getPeerReplicaIds()
        Gets list of this ReplicaId's peers. The peers of a ReplicaId are the other Replicas with which this replica forms a PartitionId.
        Returns:
        list of the peers of this ReplicaId.
      • getCapacityInBytes

        long getCapacityInBytes()
        Gets the capacity in bytes for this ReplicaId.
        Returns:
        the capacity in bytes
      • getDiskId

        DiskId getDiskId()
        Gets the DiskId that stores this ReplicaId
        Returns:
        DiskId that stores this ReplicaId
      • markDiskDown

        void markDiskDown()
        Marks the disk as down if all stores on disk are unavailable.
      • markDiskUp

        void markDiskUp()
        Marks the disk as up if at least one store on disk is available.
      • isDown

        boolean isDown()
        Returns true if the replica is down
      • isSealed

        boolean isSealed()
        Returns:
        true if this replica is in sealed state.
      • getReplicaType

        ReplicaType getReplicaType()
        Returns:
        the ReplicaType for this replica.