Class PolicyEntry

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

public class PolicyEntry extends org.apache.activemq.filter.DestinationMapEntry
Represents an entry in a PolicyMap for assigning policies to a specific destination or a hierarchical wildcard area of destinations.
  • Constructor Details

    • PolicyEntry

      public PolicyEntry()
  • Method Details

    • configure

      public void configure(Broker broker, Queue queue)
    • update

      public void update(Queue queue)
    • update

      public void update(Queue queue, Set<String> includedProperties)
      Update a queue with this policy. Only apply properties that match the includedProperties list. Not all properties are eligible to be updated. If includedProperties is null then all of the properties will be set as isUpdate will return true
      Parameters:
      queue -
      includedProperties -
    • configure

      public void configure(Broker broker, Topic topic)
    • update

      public void update(Topic topic)
    • update

      public void update(Topic topic, Set<String> includedProperties)
    • baseUpdate

      public void baseUpdate(BaseDestination destination)
    • baseUpdate

      public void baseUpdate(BaseDestination destination, Set<String> includedProperties)
    • 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
    • isSendDuplicateFromStoreToDLQ

      public boolean isSendDuplicateFromStoreToDLQ()
    • setSendDuplicateFromStoreToDLQ

      public void setSendDuplicateFromStoreToDLQ(boolean sendDuplicateFromStoreToDLQ)
      Sends a copy of message to DLQ if a duplicate messages are paged-in from the messages store
    • 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.
    • getMessageGroupMapFactoryType

      public String getMessageGroupMapFactoryType()
    • setMessageGroupMapFactoryType

      public void setMessageGroupMapFactoryType(String messageGroupMapFactoryType)
    • 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
    • isAdvisoryForDispatched

      public boolean isAdvisoryForDispatched()
    • setAdvisoryForDispatched

      public void setAdvisoryForDispatched(boolean advisoryForDispatched)
    • isAdvisoryForFastProducers

      public boolean isAdvisoryForFastProducers()
      Returns:
      the advisdoryForFastProducers
    • setAdvisoryForFastProducers

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

      public boolean isIncludeBodyForAdvisory()
      Returns true if the original message body should be included when applicable for advisory messages
      Returns:
    • setIncludeBodyForAdvisory

      public void setIncludeBodyForAdvisory(boolean includeBodyForAdvisory)
      Sets if the original message body should be included when applicable for advisory messages
      Parameters:
      includeBodyForAdvisory -
    • 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

      @Deprecated public long getInactiveTimoutBeforeGC()
      Deprecated.
      use getInactiveTimeoutBeforeGC instead.
      Returns:
      the amount of time spent inactive before GC of the destination kicks in.
    • setInactiveTimoutBeforeGC

      @Deprecated public void setInactiveTimoutBeforeGC(long inactiveTimoutBeforeGC)
      Deprecated.
      use getInactiveTimeoutBeforeGC instead.
      Sets the amount of time a destination is inactive before it is marked for GC
      Parameters:
      inactiveTimoutBeforeGC - time in milliseconds to configure as the inactive timeout.
    • getInactiveTimeoutBeforeGC

      public long getInactiveTimeoutBeforeGC()
      Returns:
      the amount of time spent inactive before GC of the destination kicks in.
    • setInactiveTimeoutBeforeGC

      public void setInactiveTimeoutBeforeGC(long inactiveTimeoutBeforeGC)
      Sets the amount of time a destination is inactive before it is marked for GC
      Parameters:
      inactiveTimeoutBeforeGC - time in milliseconds to configure as the inactive timeout.
    • 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)
    • setPersistJMSRedelivered

      public void setPersistJMSRedelivered(boolean val)
    • isPersistJMSRedelivered

      public boolean isPersistJMSRedelivered()
    • getMaxDestinations

      public int getMaxDestinations()
    • setMaxDestinations

      public void setMaxDestinations(int maxDestinations)
      Sets the maximum number of destinations that can be created
      Parameters:
      maxDestinations - maximum number of destinations
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setSendFailIfNoSpace

      public void setSendFailIfNoSpace(boolean val)
    • isSendFailIfNoSpace

      public boolean isSendFailIfNoSpace()
    • setSendFailIfNoSpaceAfterTimeout

      public void setSendFailIfNoSpaceAfterTimeout(long sendFailIfNoSpaceAfterTimeout)
    • getSendFailIfNoSpaceAfterTimeout

      public long getSendFailIfNoSpaceAfterTimeout()
    • isUseTopicSubscriptionInflightStats

      public boolean isUseTopicSubscriptionInflightStats()
    • setUseTopicSubscriptionInflightStats

      public void setUseTopicSubscriptionInflightStats(boolean useTopicSubscriptionInflightStats)