@SuppressWarnings("unchecked")
public List<String> getVersions(String targetId) throws OverloadedException, IllegalArgumentException {
try {
int concurrentUsers = m_usageCounter.incrementAndGet();
if (m_maximumNumberOfUsers != 0 && m_maximumNumberOfUsers < concurrentUsers) {
throw new OverloadedException("Too many users, maximum allowed = " + m_maximumNumberOfUsers + ", current = " + concurrentUsers, (concurrentUsers - m_maximumNumberOfUsers) * BACKOFF_TIME_PER_USER);
}
List<Version> versionList = new ArrayList<Version>();
File targetDirectory = new File(m_baseDirectory.getAbsolutePath(), targetId);
if (targetDirectory.isDirectory()) {
getVersions(targetId, versionList, targetDirectory);