@Override
  public List<ReplicaTokenInfo> retrieve(String mountPath) throws ReplicationException {
    try {
      ByteArrayOutputStream tokenOutputStream = new ByteArrayOutputStream(4096);
      boolean tokenExists = cloudDestination.retrieveTokens(mountPath, replicaTokenFileName, tokenOutputStream);
      if (tokenExists) {
        InputStream inputStream = new ByteArrayInputStream(tokenOutputStream.toByteArray());
        return replicaTokenSerde.deserializeTokens(inputStream, replicaTokenFileName);
      } else {
        return Collections.emptyList();
      }
    } catch (IOException | CloudStorageException e) {
      throw new ReplicationException("IO error while reading from replica token file at mount path " + mountPath, e);
    }
  }
Constructor for {@link CloudTokenPersistor}.
@param replicaTokenFileName the token's file name.
@param partitionGroupedByMountPath A map between mount path and list of partitions under this mount path.
@param replicationMetrics metrics including token persist time.
@param clusterMap the {@link ClusterMap} to deserialize tokens.
@param tokenHelper the {@link FindTokenHelper} to deserialize tokens.
ambry-cloud/src/main/java/com/github/ambry/cloud/CloudTokenPersistor.java