activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1423854 - in /activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb: LevelDBClient.scala LevelDBStore.scala
Date Wed, 19 Dec 2012 13:09:27 GMT
Author: gtully
Date: Wed Dec 19 13:09:26 2012
New Revision: 1423854

URL: http://svn.apache.org/viewvc?rev=1423854&view=rev
Log:
fix leveldb variant of org.apache.activemq.bugs.AMQ2584Test - add rudimentary size calculation
to leveldb

Modified:
    activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala
    activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala

Modified: activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala?rev=1423854&r1=1423853&r2=1423854&view=diff
==============================================================================
--- activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala
(original)
+++ activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBClient.scala
Wed Dec 19 13:09:26 2012
@@ -436,6 +436,8 @@ class LevelDBClient(store: LevelDBStore)
   def tempIndexFile = directory / ("temp"+INDEX_SUFFIX)
   def snapshotIndexFile(id:Long) = create_sequence_file(directory,id, INDEX_SUFFIX)
 
+  def size: Long = logRefs.size * store.logSize
+
   def createLog: RecordLog = {
     new RecordLog(logDirectory, LOG_SUFFIX)
   }

Modified: activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala?rev=1423854&r1=1423853&r2=1423854&view=diff
==============================================================================
--- activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
(original)
+++ activemq/trunk/activemq-leveldb-store/src/main/scala/org/apache/activemq/leveldb/LevelDBStore.scala
Wed Dec 19 13:09:26 2012
@@ -528,7 +528,7 @@ class LevelDBStore extends LockableServi
   }
 
   def size: Long = {
-    return 0
+    return db.client.size
   }
 
   def checkpoint(sync: Boolean): Unit = db.checkpoint(sync)



Mime
View raw message