git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@648887 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2008-04-16 22:36:08 +00:00
parent 5afe81ae4c
commit 9034af7cf4
1 changed files with 3 additions and 3 deletions

View File

@ -292,7 +292,7 @@ public class AsyncDataManager {
dataFile.decrement();
}
DataFile getDataFile(Location item) throws IOException {
synchronized DataFile getDataFile(Location item) throws IOException {
Integer key = Integer.valueOf(item.getDataFileId());
DataFile dataFile = fileMap.get(key);
if (dataFile == null) {
@ -302,7 +302,7 @@ public class AsyncDataManager {
return dataFile;
}
File getFile(Location item) throws IOException {
synchronized File getFile(Location item) throws IOException {
Integer key = Integer.valueOf(item.getDataFileId());
DataFile dataFile = fileMap.get(key);
if (dataFile == null) {
@ -414,7 +414,7 @@ public class AsyncDataManager {
}
}
public void consolidateDataFilesNotIn(Set<Integer> inUse, Integer lastFile) throws IOException {
public synchronized void consolidateDataFilesNotIn(Set<Integer> inUse, Integer lastFile) throws IOException {
Set<Integer> unUsed = new HashSet<Integer>(fileMap.keySet());
unUsed.removeAll(inUse);