activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1443057 - in /activemq/activemq-apollo/trunk: apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/ apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/
Date Wed, 06 Feb 2013 16:45:45 GMT
Author: chirino
Date: Wed Feb  6 16:45:44 2013
New Revision: 1443057

URL: http://svn.apache.org/viewvc?rev=1443057&view=rev
Log:
Simplify the bdb and leveldb stores a bit by undoing a cps api.

Modified:
    activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBClient.scala
    activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBStore.scala
    activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/LevelDBClient.scala
    activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/LevelDBStore.scala

Modified: activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBClient.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBClient.scala?rev=1443057&r1=1443056&r2=1443057&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBClient.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBClient.scala
Wed Feb  6 16:45:44 2013
@@ -341,7 +341,7 @@ class BDBClient(store: BDBStore) {
     callback.run
   }
 
-  def store(uows: Seq[BDBStore#DelayableUOW], callback:Runnable) {
+  def store(uows: Seq[BDBStore#DelayableUOW]) {
     val sync = uows.find( _.flush_sync ).isDefined
     with_ctx(sync) { ctx=>
       import ctx._
@@ -393,7 +393,6 @@ class BDBClient(store: BDBStore) {
         direct_buffer_allocator.sync
       }
     }
-    callback.run
   }
 
   def listQueues: Seq[Long] = {

Modified: activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBStore.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBStore.scala?rev=1443057&r1=1443056&r2=1443057&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBStore.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBStore.scala
Wed Feb  6 16:45:44 2013
@@ -58,11 +58,10 @@ class BDBStore(var config:BDBStoreDTO) e
 
   protected def store(uows: Seq[DelayableUOW])(callback: =>Unit) = {
     write_executor {
-      client.store(uows, ^{
-        dispatch_queue {
-          callback
-        }
-      })
+      client.store(uows)
+      dispatch_queue {
+        callback
+      }
     }
   }
 

Modified: activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/LevelDBClient.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/LevelDBClient.scala?rev=1443057&r1=1443056&r2=1443057&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/LevelDBClient.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/LevelDBClient.scala
Wed Feb  6 16:45:44 2013
@@ -831,7 +831,7 @@ class LevelDBClient(store: LevelDBStore)
     callback.run
   }
 
-  def store(uows: Seq[LevelDBStore#DelayableUOW], callback: Runnable) {
+  def store(uows: Seq[LevelDBStore#DelayableUOW]) {
     retry_using_index {
       log.appender {
         appender =>
@@ -947,7 +947,6 @@ class LevelDBClient(store: LevelDBStore)
           }
       }
     }
-    callback.run
   }
 
   val metric_load_from_index_counter = new TimeCounter

Modified: activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/LevelDBStore.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/LevelDBStore.scala?rev=1443057&r1=1443056&r2=1443057&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/LevelDBStore.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/LevelDBStore.scala
Wed Feb  6 16:45:44 2013
@@ -79,11 +79,10 @@ class LevelDBStore(val config: LevelDBSt
 
   protected def store(uows: Seq[DelayableUOW])(callback: => Unit) = {
     write_executor {
-      client.store(uows, ^ {
-        dispatch_queue {
-          callback
-        }
-      })
+      client.store(uows)
+      dispatch_queue {
+        callback
+      }
     }
   }
 



Mime
View raw message