public boolean isCompactionCandidate(long retentionPeriod) {
    return (isDeleted() && deletionTime <= (System.currentTimeMillis() - retentionPeriod)) || (isExpired()
        && expirationTime <= (System.currentTimeMillis() - retentionPeriod));
  }
@param retentionPeriod period for which blobs marked a deleted aren't compacted away.
@return true if deletion time is outside retention window or blob is expired. false otherwise.
ambry-cloud/src/main/java/com/github/ambry/cloud/CloudBlobMetadata.java