Class ReplicaStatusDelegate


  • public class ReplicaStatusDelegate
    extends java.lang.Object
    Delegate class allowing BlobStore to set the replica sealed/stopped status
    • Constructor Detail

      • ReplicaStatusDelegate

        public ReplicaStatusDelegate​(ClusterParticipant clusterParticipant)
    • Method Detail

      • seal

        public boolean seal​(ReplicaId replicaId)
        Sets replicaId to read-only status
        Parameters:
        replicaId - the ReplicaId whose status would be set to read-only.
        Returns:
        true if replica is successfully sealed. false if not.
      • unseal

        public boolean unseal​(ReplicaId replicaId)
        Sets replicaId to read-write status
        Parameters:
        replicaId - the ReplicaId whose status would be set to read-write.
        Returns:
        true if replica is successfully unsealed. false if not.
      • markStopped

        public boolean markStopped​(java.util.List<ReplicaId> replicaIds)
        Sets a list of replicaIds to stopped status
        Parameters:
        replicaIds - a list of replicas whose status would be set to stopped.
        Returns:
        true if replica is successfully marked as stopped. false if not.
      • unmarkStopped

        public boolean unmarkStopped​(java.util.List<ReplicaId> replicaIds)
        Sets a list of replicaIds to started status
        Parameters:
        replicaIds - a list of replicas whose status would be set to started.
        Returns:
        true if replica is successfully unmarked and becomes started. false if not.
      • disableReplica

        public void disableReplica​(ReplicaId replicaId)
        Disable given replica on current node (this will trigger LEADER -> STANDBY -> INACTIVE transition)
        Parameters:
        replicaId - the ReplicaId to disable
      • enableReplica

        public void enableReplica​(ReplicaId replicaId)
        Enable given replica on current node (this will trigger OFFLINE -> BOOTSTRAP -> STANDBY transition)
        Parameters:
        replicaId - the ReplicaId to disable
      • getStoppedReplicas

        public java.util.List<java.lang.String> getStoppedReplicas()
        Returns:
        a list of stopped replicas in InstanceConfig of local node.
      • getSealedReplicas

        public java.util.List<java.lang.String> getSealedReplicas()
        Returns:
        a list of sealed replicas in InstanceConfig of local node.
      • supportsStateChanges

        public boolean supportsStateChanges()
        Returns:
        true if the underlying participant supports dynamic partition state changes.