From 70314ea8a68cc6600730a659e58a4b01cfbdef75 Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Sun, 11 Jul 2010 16:09:02 +0000 Subject: [PATCH] Fix for https://issues.apache.org/activemq/browse/AMQ-2821 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@963096 13f79535-47bb-0310-9956-ffa450edef68 --- .../broker/region/policy/PolicyEntry.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java index 3a1e8987ec..b1b3a92771 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/policy/PolicyEntry.java @@ -89,6 +89,8 @@ public class PolicyEntry extends DestinationMapEntry { private SlowConsumerStrategy slowConsumerStrategy; private boolean prioritizedMessages; private boolean allConsumersExclusiveByDefault; + private boolean gcInactiveDestinations; + private long inactiveTimoutBeforeGC = BaseDestination.DEFAULT_INACTIVE_TIMEOUT_BEFORE_GC; public void configure(Broker broker,Queue queue) { @@ -159,6 +161,8 @@ public class PolicyEntry extends DestinationMapEntry { } destination.setSlowConsumerStrategy(scs); destination.setPrioritizedMessages(isPrioritizedMessages()); + destination.setGcIfInactive(isGcInactiveDestinations()); + destination.setInactiveTimoutBeforeGC(getInactiveTimoutBeforeGC()); } public void configure(Broker broker, SystemUsage memoryManager, TopicSubscription subscription) { @@ -761,4 +765,20 @@ public class PolicyEntry extends DestinationMapEntry { return allConsumersExclusiveByDefault; } + public boolean isGcInactiveDestinations() { + return this.gcInactiveDestinations; + } + + public void setGcInactiveDestinations(boolean gcInactiveDestinations) { + this.gcInactiveDestinations = gcInactiveDestinations; + } + + public long getInactiveTimoutBeforeGC() { + return this.inactiveTimoutBeforeGC; + } + + public void setInactiveTimoutBeforeGC(long inactiveTimoutBeforeGC) { + this.inactiveTimoutBeforeGC = inactiveTimoutBeforeGC; + } + }