activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r648887 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java
Date Wed, 16 Apr 2008 22:36:18 GMT
Author: rajdavies
Date: Wed Apr 16 15:36:08 2008
New Revision: 648887

URL: http://svn.apache.org/viewvc?rev=648887&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1669

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java?rev=648887&r1=648886&r2=648887&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/AsyncDataManager.java
Wed Apr 16 15:36:08 2008
@@ -292,7 +292,7 @@
         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 @@
         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 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);
                 



Mime
View raw message