protected boolean isTokenForRemoteReplicaInfo(RemoteReplicaInfo remoteReplicaInfo,
      RemoteReplicaInfo.ReplicaTokenInfo tokenInfo) {
    DataNodeId dataNodeId = remoteReplicaInfo.getReplicaId().getDataNodeId();
    return dataNodeId.getHostname().equalsIgnoreCase(tokenInfo.getHostname())
        && dataNodeId.getPort() == tokenInfo.getPort() && remoteReplicaInfo.getReplicaId()
        .getReplicaPath()
        .equals(tokenInfo.getReplicaPath());
  }
Check if a token is for the given {@link RemoteReplicaInfo} based on hostname, port and replicaPath.
@param remoteReplicaInfo The remoteReplicaInfo to check.
@param tokenInfo The tokenInfo to check.
@return true if hostname, port and replicaPath match.
ambry-replication/src/main/java/com/github/ambry/replication/ReplicationEngine.java