public synchronized List<DatasetVersionRecord> getAllValidVersionsOutOfRetentionCount(short accountId, short containerId,
      String accountName, String containerName, String datasetName) throws SQLException, AccountServiceException {
     return datasetDao.getAllValidVersionsOutOfRetentionCount(accountId, containerId, accountName, containerName, datasetName);
  }
Get all versions from a dataset which has not expired and out of retentionCount by checking the last modified time.
@param accountId the id for the parent account.
@param containerId the id of the container.
@param accountName the name for the parent account.
@param containerName the name for the container.
@param datasetName the name of the dataset.
@return a list of {@link DatasetVersionRecord}
@throws SQLException
ambry-account/src/main/java/com/github/ambry/account/mysql/MySqlAccountStore.java