@Override
  public void onPartitionBecomeStandbyFromLeader(String partitionName) {
    participantMetrics.incStateTransitionMetric(partitionName, ReplicaState.LEADER, ReplicaState.STANDBY);
    try {
      PartitionStateChangeListener cloudToStoreReplicationListener =
          partitionStateChangeListeners.get(StateModelListenerType.CloudToStoreReplicationManagerListener);
      if (cloudToStoreReplicationListener != null) {
        cloudToStoreReplicationListener.onPartitionBecomeStandbyFromLeader(partitionName);
      }
      PartitionStateChangeListener replicationManagerListener =
          partitionStateChangeListeners.get(StateModelListenerType.ReplicationManagerListener);
      if (replicationManagerListener != null) {
        replicationManagerListener.onPartitionBecomeStandbyFromLeader(partitionName);
      }
    } catch (Exception e) {
      localPartitionAndState.put(partitionName, ReplicaState.ERROR);
      throw e;
    }
    localPartitionAndState.put(partitionName, ReplicaState.STANDBY);
    participantMetrics.decStateTransitionMetric(partitionName, ReplicaState.LEADER, ReplicaState.STANDBY);
  }
If FileCopyProtocol is enabled, we will invoke the FileCopyStateChangeListener
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixParticipant.java