Author: chirino
Date: Tue Dec 21 15:33:53 2010
New Revision: 1051529
URL: http://svn.apache.org/viewvc?rev=1051529&view=rev
Log:
Move more common metrics stuff into the base class.
Modified:
activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/store/bdb/BDBStore.scala
activemq/activemq-apollo/trunk/apollo-hawtdb/src/main/scala/org/apache/activemq/apollo/store/hawtdb/HawtDBStore.scala
activemq/activemq-apollo/trunk/apollo-store/src/main/scala/org/apache/activemq/apollo/store/DelayingStoreSupport.scala
Modified:
activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/store/bdb/BDBStore.scala
URL:
http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/store/bdb/BDBStore.scala?rev=1051529&r1=1051528&r2=1051529&view=diff
==============================================================================
---
activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/store/bdb/BDBStore.scala
(original)
+++
activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/store/bdb/BDBStore.scala
Tue Dec 21 15:33:53 2010
@@ -133,10 +133,10 @@ class BDBStore extends DelayingStoreSupp
override def run = {
info("Stopping BDB store at: '%s'", config.directory)
write_executor.shutdown
- write_executor.awaitTermination(86400, TimeUnit.SECONDS)
+ write_executor.awaitTermination(60, TimeUnit.SECONDS)
write_executor = null
read_executor.shutdown
- read_executor.awaitTermination(86400, TimeUnit.SECONDS)
+ read_executor.awaitTermination(60, TimeUnit.SECONDS)
read_executor = null
client.stop
onCompleted.run
@@ -230,25 +230,6 @@ class BDBStore extends DelayingStoreSupp
}
}
-
- implicit def toTimeMetricDTO( m: TimeMetric) = {
- val rc = new TimeMetricDTO()
- rc.count = m.count
- rc.max = m.max
- rc.min = m.min
- rc.total = m.total
- rc
- }
-
- implicit def toIntMetricDTO( m: IntMetric) = {
- val rc = new IntMetricDTO()
- rc.count = m.count
- rc.max = m.max
- rc.min = m.min
- rc.total = m.total
- rc
- }
-
def poll_stats:Unit = {
def displayStats = {
if( serviceState.isStarted ) {
Modified:
activemq/activemq-apollo/trunk/apollo-hawtdb/src/main/scala/org/apache/activemq/apollo/store/hawtdb/HawtDBStore.scala
URL:
http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-hawtdb/src/main/scala/org/apache/activemq/apollo/store/hawtdb/HawtDBStore.scala?rev=1051529&r1=1051528&r2=1051529&view=diff
==============================================================================
---
activemq/activemq-apollo/trunk/apollo-hawtdb/src/main/scala/org/apache/activemq/apollo/store/hawtdb/HawtDBStore.scala
(original)
+++
activemq/activemq-apollo/trunk/apollo-hawtdb/src/main/scala/org/apache/activemq/apollo/store/hawtdb/HawtDBStore.scala
Tue Dec 21 15:33:53 2010
@@ -248,25 +248,6 @@ class HawtDBStore extends DelayingStoreS
}
}
-
- implicit def toTimeMetricDTO( m: TimeMetric) = {
- val rc = new TimeMetricDTO()
- rc.count = m.count
- rc.max = m.max
- rc.min = m.min
- rc.total = m.total
- rc
- }
-
- implicit def toIntMetricDTO( m: IntMetric) = {
- val rc = new IntMetricDTO()
- rc.count = m.count
- rc.max = m.max
- rc.min = m.min
- rc.total = m.total
- rc
- }
-
def poll_stats:Unit = {
def displayStats = {
if( serviceState.isStarted ) {
Modified:
activemq/activemq-apollo/trunk/apollo-store/src/main/scala/org/apache/activemq/apollo/store/DelayingStoreSupport.scala
URL:
http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-store/src/main/scala/org/apache/activemq/apollo/store/DelayingStoreSupport.scala?rev=1051529&r1=1051528&r2=1051529&view=diff
==============================================================================
---
activemq/activemq-apollo/trunk/apollo-store/src/main/scala/org/apache/activemq/apollo/store/DelayingStoreSupport.scala
(original)
+++
activemq/activemq-apollo/trunk/apollo-store/src/main/scala/org/apache/activemq/apollo/store/DelayingStoreSupport.scala
Tue Dec 21 15:33:53 2010
@@ -23,6 +23,7 @@ import org.fusesource.hawtdispatch._
import java.util.concurrent._
import org.apache.activemq.apollo.util._
import org.fusesource.hawtdispatch.{BaseRetained, ListEventAggregator}
+import org.apache.activemq.apollo.dto.{TimeMetricDTO, IntMetricDTO}
/**
* <p>
@@ -175,6 +176,24 @@ trait DelayingStoreSupport extends Store
}
+ implicit def toTimeMetricDTO( m: TimeMetric) = {
+ val rc = new TimeMetricDTO()
+ rc.count = m.count
+ rc.max = m.max
+ rc.min = m.min
+ rc.total = m.total
+ rc
+ }
+
+ implicit def toIntMetricDTO( m: IntMetric) = {
+ val rc = new IntMetricDTO()
+ rc.count = m.count
+ rc.max = m.max
+ rc.min = m.min
+ rc.total = m.total
+ rc
+ }
+
var metric_canceled_message_counter:Long = 0
var metric_canceled_enqueue_counter:Long = 0
var metric_flushed_message_counter:Long = 0
@@ -186,6 +205,9 @@ trait DelayingStoreSupport extends Store
val message_load_latency_counter = new TimeCounter
var message_load_latency = message_load_latency_counter(false)
+ val range_load_latency_counter = new TimeCounter
+ var range_load_latency = message_load_latency_counter(false)
+
val message_load_batch_size_counter = new IntMetricCounter
var message_load_batch_size = message_load_batch_size_counter(false)