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/%[email protected]%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 on JB suggestion. Improvement is a good idea, but let's not break previous users. Perhaps even make the improvement the default (or recommended) in 5.17.0 -- 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: [email protected]
