@Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null || getClass() != obj.getClass()) {
      return false;
    }
    RemoteReplicaInfo info = (RemoteReplicaInfo) obj;
    if (Objects.equals(port, info.getPort()) && info.getReplicaId().getReplicaPath().equals(replicaId.getMountPath())
        && info.getLocalReplicaId().getReplicaPath().equals(localReplicaId.getMountPath())) {
      return true;
    }
    return false;
  }
get the token to persist. Returns either the candidate token if enough time has passed since it was
set, or the last token again.
ambry-replication/src/main/java/com/github/ambry/replication/RemoteReplicaInfo.java