activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r961146 - /activemq/sandbox/activemq-apollo-actor/activemq-cassandra/src/main/scala/org/apache/activemq/broker/store/cassandra/CassandraStore.scala
Date Wed, 07 Jul 2010 04:10:46 GMT
Author: chirino
Date: Wed Jul  7 04:10:46 2010
New Revision: 961146

URL: http://svn.apache.org/viewvc?rev=961146&view=rev
Log:
use a thread pool that grows up to 20.

Modified:
    activemq/sandbox/activemq-apollo-actor/activemq-cassandra/src/main/scala/org/apache/activemq/broker/store/cassandra/CassandraStore.scala

Modified: activemq/sandbox/activemq-apollo-actor/activemq-cassandra/src/main/scala/org/apache/activemq/broker/store/cassandra/CassandraStore.scala
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-cassandra/src/main/scala/org/apache/activemq/broker/store/cassandra/CassandraStore.scala?rev=961146&r1=961145&r2=961146&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-cassandra/src/main/scala/org/apache/activemq/broker/store/cassandra/CassandraStore.scala
(original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-cassandra/src/main/scala/org/apache/activemq/broker/store/cassandra/CassandraStore.scala
Wed Jul  7 04:10:46 2010
@@ -76,7 +76,7 @@ class CassandraStore extends Store with 
 
   val client = new CassandraClient()
   var config:CassandraStoreDTO = defaultConfig
-  var blocking:ThreadPoolExecutor = null
+  var blocking:ExecutorService = null
 
   def configure(config: StoreDTO, reporter: Reporter) = configure(config.asInstanceOf[CassandraStoreDTO],
reporter)
 
@@ -93,8 +93,7 @@ class CassandraStore extends Store with 
 
 
   protected def _start(onCompleted: Runnable) = {
-
-    blocking = new ThreadPoolExecutor(4, 20, 1, TimeUnit.SECONDS, new LinkedBlockingQueue[Runnable](),
new ThreadFactory(){
+    blocking = Executors.newFixedThreadPool(20, new ThreadFactory(){
       def newThread(r: Runnable) = {
         val rc = new Thread(r, "cassandra client")
         rc.setDaemon(true)



Mime
View raw message