You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2021/03/22 17:03:18 UTC

[GitHub] [activemq] mattrpav commented on a change in pull request #297: AMQ-7050: Allow alternate persistence mechanism with SubQueueSelectorCacheBrokerPlugin

mattrpav commented on a change in pull request #297:
URL: https://github.com/apache/activemq/pull/297#discussion_r598909652



##########
File path: activemq-broker/src/main/java/org/apache/activemq/plugin/SubQueueSelectorCacheBroker.java
##########
@@ -58,39 +49,27 @@
  * https://issues.apache.org/activemq/browse/AMQ-3004
  * http://mail-archives.apache.org/mod_mbox/activemq-users/201011.mbox/%3C8A013711-2613-450A-A487-379E784AF1D6@homeaway.co.uk%3E
  */
-public class SubQueueSelectorCacheBroker extends BrokerFilter implements Runnable {
+public class SubQueueSelectorCacheBroker extends BrokerFilter {
     private static final Logger LOG = LoggerFactory.getLogger(SubQueueSelectorCacheBroker.class);
     public static final String MATCH_EVERYTHING = "TRUE";
 
     /**
      * The subscription's selector cache. We cache compiled expressions keyed
      * by the target destination.
      */
-    private ConcurrentMap<String, Set<String>> subSelectorCache = new ConcurrentHashMap<String, Set<String>>();
+    private final SubSelectorCache subSelectorCache;
 
-    private final File persistFile;
     private boolean singleSelectorPerDestination = false;
     private boolean ignoreWildcardSelectors = false;
     private ObjectName objectName;
 
-    private boolean running = true;
-    private final Thread persistThread;
-    private long persistInterval = MAX_PERSIST_INTERVAL;
-    public static final long MAX_PERSIST_INTERVAL = 600000;
-    private static final String SELECTOR_CACHE_PERSIST_THREAD_NAME = "SelectorCachePersistThread";
-
     /**
      * Constructor
      */
-    public SubQueueSelectorCacheBroker(Broker next, final File persistFile) {
+    public SubQueueSelectorCacheBroker(Broker next, final SubSelectorCache subSelectorCache) {

Review comment:
       +1 JB




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org