activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r757507 - in /activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker: VirtualHost.java store/BrokerDatabase.java
Date Mon, 23 Mar 2009 19:09:37 GMT
Author: chirino
Date: Mon Mar 23 19:09:37 2009
New Revision: 757507

URL: http://svn.apache.org/viewvc?rev=757507&view=rev
Log:
Use the BrokerDatabase instead of the Store

Modified:
    activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/VirtualHost.java
    activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/store/BrokerDatabase.java

Modified: activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/VirtualHost.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/VirtualHost.java?rev=757507&r1=757506&r2=757507&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/VirtualHost.java
(original)
+++ activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/VirtualHost.java
Mon Mar 23 19:09:37 2009
@@ -20,8 +20,7 @@
 import java.util.HashMap;
 
 import org.apache.activemq.Service;
-import org.apache.activemq.broker.store.Store;
-import org.apache.activemq.broker.store.memory.MemoryStore;
+import org.apache.activemq.broker.store.BrokerDatabase;
 import org.apache.activemq.protobuf.AsciiBuffer;
 
 /**
@@ -32,7 +31,7 @@
     final private HashMap<Destination, Queue> queues = new HashMap<Destination,
Queue>();
     private ArrayList<AsciiBuffer> hostNames = new ArrayList<AsciiBuffer>();
     private Router router;
-    private Store store = new MemoryStore();
+    private BrokerDatabase database = new BrokerDatabase();
     
     public VirtualHost() {
         setRouter(new Router());
@@ -76,12 +75,12 @@
         domain.add(queue.getDestination().getName(), queue);
     }
 
-    public Store getStore() {
-        return store;
+    public BrokerDatabase getDatabase() {
+        return database;
     }
 
-    public void setStore(Store store) {
-        this.store = store;
+    public void setDatabase(BrokerDatabase store) {
+        this.database = store;
     }
 
 

Modified: activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/store/BrokerDatabase.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/store/BrokerDatabase.java?rev=757507&r1=757506&r2=757507&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/store/BrokerDatabase.java
(original)
+++ activemq/sandbox/activemq-flow/src/main/java/org/apache/activemq/broker/store/BrokerDatabase.java
Mon Mar 23 19:09:37 2009
@@ -28,6 +28,7 @@
 import org.apache.activemq.broker.store.Store.Session;
 import org.apache.activemq.broker.store.Store.Session.MessageRecord;
 import org.apache.activemq.broker.store.Store.Session.QueueNotFoundException;
+import org.apache.activemq.broker.store.memory.MemoryStore;
 import org.apache.activemq.flow.Flow;
 import org.apache.activemq.flow.ISourceController;
 import org.apache.activemq.flow.SizeLimiter;
@@ -39,7 +40,7 @@
 
 public class BrokerDatabase {
 
-    private Store store;
+    private Store store = new MemoryStore();
     private final Flow databaseFlow = new Flow("database", false);
 
     private final SizeLimiter<Operation> storeLimiter;
@@ -60,7 +61,7 @@
         public void onDatabaseException(IOException ioe);
     }
 
-    public BrokerDatabase(Store store) {
+    public BrokerDatabase() {
         storeLimiter = new SizeLimiter<Operation>(1024 * 512, 0) {
             public int getElementSize(Operation op) {
                 return op.getLimiterSize();



Mime
View raw message