@Override
  protected void prePeerModification(MasterProcedureEnv env) throws IOException {
    MasterCoprocessorHost cpHost = env.getMasterCoprocessorHost();
    if (cpHost != null) {
      cpHost.preDisableReplicationPeer(peerId);
    }
    env.getReplicationPeerManager().preDisablePeer(peerId);
  }
The procedure for disabling a replication peer.
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/DisablePeerProcedure.java