org.apache.activemq.broker.region.policy
Class PolicyEntry

java.lang.Object
  extended by org.apache.activemq.filter.DestinationMapEntry
      extended by org.apache.activemq.broker.region.policy.PolicyEntry
All Implemented Interfaces:
Comparable

public class PolicyEntry
extends DestinationMapEntry

Represents an entry in a PolicyMap for assigning policies to a specific destination or a hierarchical wildcard area of destinations.


Field Summary
 
Fields inherited from class org.apache.activemq.filter.DestinationMapEntry
destination
 
Constructor Summary
PolicyEntry()
           
 
Method Summary
 void baseConfiguration(Broker broker, BaseDestination destination)
           
 void configure(Broker broker, Queue queue)
           
 void configure(Broker broker, SystemUsage memoryManager, DurableTopicSubscription sub)
           
 void configure(Broker broker, SystemUsage memoryManager, QueueBrowserSubscription sub)
           
 void configure(Broker broker, SystemUsage memoryManager, QueueSubscription sub)
           
 void configure(Broker broker, SystemUsage memoryManager, TopicSubscription subscription)
           
 void configure(Broker broker, Topic topic)
           
 void configurePrefetch(Subscription subscription)
           
 long getBlockedProducerWarningInterval()
           
 int getConsumersBeforeDispatchStarts()
           
 int getCursorMemoryHighWaterMark()
           
 DeadLetterStrategy getDeadLetterStrategy()
           
 DispatchPolicy getDispatchPolicy()
           
 int getDurableTopicPrefetch()
          Get the durableTopicPrefetch
 long getExpireMessagesPeriod()
           
 long getInactiveTimoutBeforeGC()
           
 int getMaxAuditDepth()
           
 int getMaxBrowsePageSize()
           
 int getMaxExpirePageSize()
           
 int getMaxPageSize()
           
 int getMaxProducersToAudit()
           
 int getMaxQueueAuditDepth()
           
 long getMemoryLimit()
           
 MessageEvictionStrategy getMessageEvictionStrategy()
           
 MessageGroupMapFactory getMessageGroupMapFactory()
           
 long getMinimumMessageSize()
           
 NetworkBridgeFilterFactory getNetworkBridgeFilterFactory()
           
 int getOptimizeMessageStoreInFlightLimit()
           
 PendingDurableSubscriberMessageStoragePolicy getPendingDurableSubscriberPolicy()
           
 PendingMessageLimitStrategy getPendingMessageLimitStrategy()
           
 PendingQueueMessageStoragePolicy getPendingQueuePolicy()
           
 PendingSubscriberMessageStoragePolicy getPendingSubscriberPolicy()
           
 int getQueueBrowserPrefetch()
          Get the queueBrowserPrefetch
 int getQueuePrefetch()
          Get the queuePrefetch
 SlowConsumerStrategy getSlowConsumerStrategy()
           
 int getStoreUsageHighWaterMark()
           
 SubscriptionRecoveryPolicy getSubscriptionRecoveryPolicy()
           
 int getTimeBeforeDispatchStarts()
           
 int getTopicPrefetch()
          Get the topicPrefetch
 boolean isAdvisoryForConsumed()
           
 boolean isAdvisoryForDelivery()
           
 boolean isAdvisoryForDiscardingMessages()
           
 boolean isAdvisoryForFastProducers()
           
 boolean isAdvisoryForSlowConsumers()
           
 boolean isAdvisoryWhenFull()
           
 boolean isAllConsumersExclusiveByDefault()
           
 boolean isAlwaysRetroactive()
           
 boolean isDoOptimzeMessageStorage()
           
 boolean isEnableAudit()
           
 boolean isGcInactiveDestinations()
           
 boolean isGcWithNetworkConsumers()
           
 boolean isLazyDispatch()
           
 boolean isOptimizedDispatch()
           
 boolean isPrioritizedMessages()
           
 boolean isProducerFlowControl()
           
 boolean isReduceMemoryFootprint()
           
 boolean isSendAdvisoryIfNoConsumers()
           
 boolean isStrictOrderDispatch()
           
 boolean isUseCache()
           
 boolean isUseConsumerPriority()
           
 boolean isUsePrefetchExtension()
           
 void setAdvisoryForConsumed(boolean advisoryForConsumed)
           
 void setAdvisoryForDelivery(boolean advisoryForDelivery)
           
 void setAdvisoryForDiscardingMessages(boolean advisoryForDiscardingMessages)
           
 void setAdvisoryForFastProducers(boolean advisoryForFastProducers)
           
 void setAdvisoryForSlowConsumers(boolean advisoryForSlowConsumers)
           
 void setAdvisoryWhenFull(boolean advisoryWhenFull)
           
 void setAllConsumersExclusiveByDefault(boolean allConsumersExclusiveByDefault)
           
 void setAlwaysRetroactive(boolean alwaysRetroactive)
           
 void setBlockedProducerWarningInterval(long blockedProducerWarningInterval)
          Set's the interval at which warnings about producers being blocked by resource usage will be triggered.
 void setConsumersBeforeDispatchStarts(int consumersBeforeDispatchStarts)
           
 void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark)
           
 void setDeadLetterStrategy(DeadLetterStrategy deadLetterStrategy)
          Sets the policy used to determine which dead letter queue destination should be used
 void setDispatchPolicy(DispatchPolicy policy)
           
 void setDoOptimzeMessageStorage(boolean doOptimzeMessageStorage)
           
 void setDurableTopicPrefetch(int durableTopicPrefetch)
          Set the durableTopicPrefetch
 void setEnableAudit(boolean enableAudit)
           
 void setExpireMessagesPeriod(long expireMessagesPeriod)
           
 void setGcInactiveDestinations(boolean gcInactiveDestinations)
           
 void setGcWithNetworkConsumers(boolean gcWithNetworkConsumers)
           
 void setInactiveTimoutBeforeGC(long inactiveTimoutBeforeGC)
           
 void setLazyDispatch(boolean lazyDispatch)
           
 void setMaxAuditDepth(int maxAuditDepth)
           
 void setMaxBrowsePageSize(int maxPageSize)
           
 void setMaxExpirePageSize(int maxExpirePageSize)
           
 void setMaxPageSize(int maxPageSize)
           
 void setMaxProducersToAudit(int maxProducersToAudit)
           
 void setMaxQueueAuditDepth(int maxQueueAuditDepth)
           
 void setMemoryLimit(long memoryLimit)
          When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
 void setMessageEvictionStrategy(MessageEvictionStrategy messageEvictionStrategy)
          Sets the eviction strategy used to decide which message to evict when the slow consumer needs to discard messages
 void setMessageGroupMapFactory(MessageGroupMapFactory messageGroupMapFactory)
          Sets the factory used to create new instances of {MessageGroupMap} used to implement the Message Groups functionality.
 void setMinimumMessageSize(long minimumMessageSize)
           
 void setNetworkBridgeFilterFactory(NetworkBridgeFilterFactory networkBridgeFilterFactory)
           
 void setOptimizedDispatch(boolean optimizedDispatch)
           
 void setOptimizeMessageStoreInFlightLimit(int optimizeMessageStoreInFlightLimit)
           
 void setPendingDurableSubscriberPolicy(PendingDurableSubscriberMessageStoragePolicy pendingDurableSubscriberPolicy)
           
 void setPendingMessageLimitStrategy(PendingMessageLimitStrategy pendingMessageLimitStrategy)
          Sets the strategy to calculate the maximum number of messages that are allowed to be pending on consumers (in addition to their prefetch sizes).
 void setPendingQueuePolicy(PendingQueueMessageStoragePolicy pendingQueuePolicy)
           
 void setPendingSubscriberPolicy(PendingSubscriberMessageStoragePolicy pendingSubscriberPolicy)
           
 void setPrioritizedMessages(boolean prioritizedMessages)
           
 void setProducerFlowControl(boolean producerFlowControl)
           
 void setQueueBrowserPrefetch(int queueBrowserPrefetch)
          Set the queueBrowserPrefetch
 void setQueuePrefetch(int queuePrefetch)
          Set the queuePrefetch
 void setReduceMemoryFootprint(boolean reduceMemoryFootprint)
           
 void setSendAdvisoryIfNoConsumers(boolean sendAdvisoryIfNoConsumers)
          Sends an advisory message if a non-persistent message is sent and there are no active consumers
 void setSlowConsumerStrategy(SlowConsumerStrategy slowConsumerStrategy)
           
 void setStoreUsageHighWaterMark(int storeUsageHighWaterMark)
           
 void setStrictOrderDispatch(boolean strictOrderDispatch)
           
 void setSubscriptionRecoveryPolicy(SubscriptionRecoveryPolicy subscriptionRecoveryPolicy)
           
 void setTimeBeforeDispatchStarts(int timeBeforeDispatchStarts)
           
 void setTopicPrefetch(int topicPrefetch)
          Set the topicPrefetch
 void setUseCache(boolean useCache)
           
 void setUseConsumerPriority(boolean useConsumerPriority)
           
 void setUsePrefetchExtension(boolean usePrefetchExtension)
           
 
Methods inherited from class org.apache.activemq.filter.DestinationMapEntry
compareTo, getDestination, getValue, setDestination, setQueue, setTempQueue, setTempTopic, setTopic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyEntry

public PolicyEntry()
Method Detail

configure

public void configure(Broker broker,
                      Queue queue)

configure

public void configure(Broker broker,
                      Topic topic)

baseConfiguration

public void baseConfiguration(Broker broker,
                              BaseDestination destination)

configure

public void configure(Broker broker,
                      SystemUsage memoryManager,
                      TopicSubscription subscription)

configure

public void configure(Broker broker,
                      SystemUsage memoryManager,
                      DurableTopicSubscription sub)

configure

public void configure(Broker broker,
                      SystemUsage memoryManager,
                      QueueBrowserSubscription sub)

configure

public void configure(Broker broker,
                      SystemUsage memoryManager,
                      QueueSubscription sub)

configurePrefetch

public void configurePrefetch(Subscription subscription)

getDispatchPolicy

public DispatchPolicy getDispatchPolicy()

setDispatchPolicy

public void setDispatchPolicy(DispatchPolicy policy)

getSubscriptionRecoveryPolicy

public SubscriptionRecoveryPolicy getSubscriptionRecoveryPolicy()

setSubscriptionRecoveryPolicy

public void setSubscriptionRecoveryPolicy(SubscriptionRecoveryPolicy subscriptionRecoveryPolicy)

isSendAdvisoryIfNoConsumers

public boolean isSendAdvisoryIfNoConsumers()

setSendAdvisoryIfNoConsumers

public void setSendAdvisoryIfNoConsumers(boolean sendAdvisoryIfNoConsumers)
Sends an advisory message if a non-persistent message is sent and there are no active consumers


getDeadLetterStrategy

public DeadLetterStrategy getDeadLetterStrategy()

setDeadLetterStrategy

public void setDeadLetterStrategy(DeadLetterStrategy deadLetterStrategy)
Sets the policy used to determine which dead letter queue destination should be used


getPendingMessageLimitStrategy

public PendingMessageLimitStrategy getPendingMessageLimitStrategy()

setPendingMessageLimitStrategy

public void setPendingMessageLimitStrategy(PendingMessageLimitStrategy pendingMessageLimitStrategy)
Sets the strategy to calculate the maximum number of messages that are allowed to be pending on consumers (in addition to their prefetch sizes). Once the limit is reached, non-durable topics can then start discarding old messages. This allows us to keep dispatching messages to slow consumers while not blocking fast consumers and discarding the messages oldest first.


getMessageEvictionStrategy

public MessageEvictionStrategy getMessageEvictionStrategy()

setMessageEvictionStrategy

public void setMessageEvictionStrategy(MessageEvictionStrategy messageEvictionStrategy)
Sets the eviction strategy used to decide which message to evict when the slow consumer needs to discard messages


getMemoryLimit

public long getMemoryLimit()

setMemoryLimit

public void setMemoryLimit(long memoryLimit)
When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used


getMessageGroupMapFactory

public MessageGroupMapFactory getMessageGroupMapFactory()

setMessageGroupMapFactory

public void setMessageGroupMapFactory(MessageGroupMapFactory messageGroupMapFactory)
Sets the factory used to create new instances of {MessageGroupMap} used to implement the Message Groups functionality.


getPendingDurableSubscriberPolicy

public PendingDurableSubscriberMessageStoragePolicy getPendingDurableSubscriberPolicy()
Returns:
the pendingDurableSubscriberPolicy

setPendingDurableSubscriberPolicy

public void setPendingDurableSubscriberPolicy(PendingDurableSubscriberMessageStoragePolicy pendingDurableSubscriberPolicy)
Parameters:
pendingDurableSubscriberPolicy - the pendingDurableSubscriberPolicy to set

getPendingQueuePolicy

public PendingQueueMessageStoragePolicy getPendingQueuePolicy()
Returns:
the pendingQueuePolicy

setPendingQueuePolicy

public void setPendingQueuePolicy(PendingQueueMessageStoragePolicy pendingQueuePolicy)
Parameters:
pendingQueuePolicy - the pendingQueuePolicy to set

getPendingSubscriberPolicy

public PendingSubscriberMessageStoragePolicy getPendingSubscriberPolicy()
Returns:
the pendingSubscriberPolicy

setPendingSubscriberPolicy

public void setPendingSubscriberPolicy(PendingSubscriberMessageStoragePolicy pendingSubscriberPolicy)
Parameters:
pendingSubscriberPolicy - the pendingSubscriberPolicy to set

isProducerFlowControl

public boolean isProducerFlowControl()
Returns:
true if producer flow control enabled

setProducerFlowControl

public void setProducerFlowControl(boolean producerFlowControl)
Parameters:
producerFlowControl -

isAlwaysRetroactive

public boolean isAlwaysRetroactive()
Returns:
true if topic is always retroactive

setAlwaysRetroactive

public void setAlwaysRetroactive(boolean alwaysRetroactive)
Parameters:
alwaysRetroactive -

setBlockedProducerWarningInterval

public void setBlockedProducerWarningInterval(long blockedProducerWarningInterval)
Set's the interval at which warnings about producers being blocked by resource usage will be triggered. Values of 0 or less will disable warnings

Parameters:
blockedProducerWarningInterval - the interval at which warning about blocked producers will be triggered.

getBlockedProducerWarningInterval

public long getBlockedProducerWarningInterval()
Returns:
the interval at which warning about blocked producers will be triggered.

getMaxProducersToAudit

public int getMaxProducersToAudit()
Returns:
the maxProducersToAudit

setMaxProducersToAudit

public void setMaxProducersToAudit(int maxProducersToAudit)
Parameters:
maxProducersToAudit - the maxProducersToAudit to set

getMaxAuditDepth

public int getMaxAuditDepth()
Returns:
the maxAuditDepth

setMaxAuditDepth

public void setMaxAuditDepth(int maxAuditDepth)
Parameters:
maxAuditDepth - the maxAuditDepth to set

isEnableAudit

public boolean isEnableAudit()
Returns:
the enableAudit

setEnableAudit

public void setEnableAudit(boolean enableAudit)
Parameters:
enableAudit - the enableAudit to set

getMaxQueueAuditDepth

public int getMaxQueueAuditDepth()

setMaxQueueAuditDepth

public void setMaxQueueAuditDepth(int maxQueueAuditDepth)

isOptimizedDispatch

public boolean isOptimizedDispatch()

setOptimizedDispatch

public void setOptimizedDispatch(boolean optimizedDispatch)

getMaxPageSize

public int getMaxPageSize()

setMaxPageSize

public void setMaxPageSize(int maxPageSize)

getMaxBrowsePageSize

public int getMaxBrowsePageSize()

setMaxBrowsePageSize

public void setMaxBrowsePageSize(int maxPageSize)

isUseCache

public boolean isUseCache()

setUseCache

public void setUseCache(boolean useCache)

getMinimumMessageSize

public long getMinimumMessageSize()

setMinimumMessageSize

public void setMinimumMessageSize(long minimumMessageSize)

isUseConsumerPriority

public boolean isUseConsumerPriority()

setUseConsumerPriority

public void setUseConsumerPriority(boolean useConsumerPriority)

isStrictOrderDispatch

public boolean isStrictOrderDispatch()

setStrictOrderDispatch

public void setStrictOrderDispatch(boolean strictOrderDispatch)

isLazyDispatch

public boolean isLazyDispatch()

setLazyDispatch

public void setLazyDispatch(boolean lazyDispatch)

getTimeBeforeDispatchStarts

public int getTimeBeforeDispatchStarts()

setTimeBeforeDispatchStarts

public void setTimeBeforeDispatchStarts(int timeBeforeDispatchStarts)

getConsumersBeforeDispatchStarts

public int getConsumersBeforeDispatchStarts()

setConsumersBeforeDispatchStarts

public void setConsumersBeforeDispatchStarts(int consumersBeforeDispatchStarts)

isAdvisoryForSlowConsumers

public boolean isAdvisoryForSlowConsumers()
Returns:
the advisoryForSlowConsumers

setAdvisoryForSlowConsumers

public void setAdvisoryForSlowConsumers(boolean advisoryForSlowConsumers)
Parameters:
advisoryForSlowConsumers - the advisoryForSlowConsumers to set

isAdvisoryForDiscardingMessages

public boolean isAdvisoryForDiscardingMessages()
Returns:
the advisoryForDiscardingMessages

setAdvisoryForDiscardingMessages

public void setAdvisoryForDiscardingMessages(boolean advisoryForDiscardingMessages)
Parameters:
advisoryForDiscardingMessages - the advisoryForDiscardingMessages to set

isAdvisoryWhenFull

public boolean isAdvisoryWhenFull()
Returns:
the advisoryWhenFull

setAdvisoryWhenFull

public void setAdvisoryWhenFull(boolean advisoryWhenFull)
Parameters:
advisoryWhenFull - the advisoryWhenFull to set

isAdvisoryForDelivery

public boolean isAdvisoryForDelivery()
Returns:
the advisoryForDelivery

setAdvisoryForDelivery

public void setAdvisoryForDelivery(boolean advisoryForDelivery)
Parameters:
advisoryForDelivery - the advisoryForDelivery to set

isAdvisoryForConsumed

public boolean isAdvisoryForConsumed()
Returns:
the advisoryForConsumed

setAdvisoryForConsumed

public void setAdvisoryForConsumed(boolean advisoryForConsumed)
Parameters:
advisoryForConsumed - the advisoryForConsumed to set

isAdvisoryForFastProducers

public boolean isAdvisoryForFastProducers()
Returns:
the advisdoryForFastProducers

setAdvisoryForFastProducers

public void setAdvisoryForFastProducers(boolean advisoryForFastProducers)
Parameters:
advisoryForFastProducers - the advisdoryForFastProducers to set

setMaxExpirePageSize

public void setMaxExpirePageSize(int maxExpirePageSize)

getMaxExpirePageSize

public int getMaxExpirePageSize()

setExpireMessagesPeriod

public void setExpireMessagesPeriod(long expireMessagesPeriod)

getExpireMessagesPeriod

public long getExpireMessagesPeriod()

getQueuePrefetch

public int getQueuePrefetch()
Get the queuePrefetch

Returns:
the queuePrefetch

setQueuePrefetch

public void setQueuePrefetch(int queuePrefetch)
Set the queuePrefetch

Parameters:
queuePrefetch - the queuePrefetch to set

getQueueBrowserPrefetch

public int getQueueBrowserPrefetch()
Get the queueBrowserPrefetch

Returns:
the queueBrowserPrefetch

setQueueBrowserPrefetch

public void setQueueBrowserPrefetch(int queueBrowserPrefetch)
Set the queueBrowserPrefetch

Parameters:
queueBrowserPrefetch - the queueBrowserPrefetch to set

getTopicPrefetch

public int getTopicPrefetch()
Get the topicPrefetch

Returns:
the topicPrefetch

setTopicPrefetch

public void setTopicPrefetch(int topicPrefetch)
Set the topicPrefetch

Parameters:
topicPrefetch - the topicPrefetch to set

getDurableTopicPrefetch

public int getDurableTopicPrefetch()
Get the durableTopicPrefetch

Returns:
the durableTopicPrefetch

setDurableTopicPrefetch

public void setDurableTopicPrefetch(int durableTopicPrefetch)
Set the durableTopicPrefetch

Parameters:
durableTopicPrefetch - the durableTopicPrefetch to set

isUsePrefetchExtension

public boolean isUsePrefetchExtension()

setUsePrefetchExtension

public void setUsePrefetchExtension(boolean usePrefetchExtension)

getCursorMemoryHighWaterMark

public int getCursorMemoryHighWaterMark()

setCursorMemoryHighWaterMark

public void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark)

setStoreUsageHighWaterMark

public void setStoreUsageHighWaterMark(int storeUsageHighWaterMark)

getStoreUsageHighWaterMark

public int getStoreUsageHighWaterMark()

setSlowConsumerStrategy

public void setSlowConsumerStrategy(SlowConsumerStrategy slowConsumerStrategy)

getSlowConsumerStrategy

public SlowConsumerStrategy getSlowConsumerStrategy()

isPrioritizedMessages

public boolean isPrioritizedMessages()

setPrioritizedMessages

public void setPrioritizedMessages(boolean prioritizedMessages)

setAllConsumersExclusiveByDefault

public void setAllConsumersExclusiveByDefault(boolean allConsumersExclusiveByDefault)

isAllConsumersExclusiveByDefault

public boolean isAllConsumersExclusiveByDefault()

isGcInactiveDestinations

public boolean isGcInactiveDestinations()

setGcInactiveDestinations

public void setGcInactiveDestinations(boolean gcInactiveDestinations)

getInactiveTimoutBeforeGC

public long getInactiveTimoutBeforeGC()

setInactiveTimoutBeforeGC

public void setInactiveTimoutBeforeGC(long inactiveTimoutBeforeGC)

setGcWithNetworkConsumers

public void setGcWithNetworkConsumers(boolean gcWithNetworkConsumers)

isGcWithNetworkConsumers

public boolean isGcWithNetworkConsumers()

isReduceMemoryFootprint

public boolean isReduceMemoryFootprint()

setReduceMemoryFootprint

public void setReduceMemoryFootprint(boolean reduceMemoryFootprint)

setNetworkBridgeFilterFactory

public void setNetworkBridgeFilterFactory(NetworkBridgeFilterFactory networkBridgeFilterFactory)

getNetworkBridgeFilterFactory

public NetworkBridgeFilterFactory getNetworkBridgeFilterFactory()

isDoOptimzeMessageStorage

public boolean isDoOptimzeMessageStorage()

setDoOptimzeMessageStorage

public void setDoOptimzeMessageStorage(boolean doOptimzeMessageStorage)

getOptimizeMessageStoreInFlightLimit

public int getOptimizeMessageStoreInFlightLimit()

setOptimizeMessageStoreInFlightLimit

public void setOptimizeMessageStoreInFlightLimit(int optimizeMessageStoreInFlightLimit)


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.