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.-
Field Summary
Fields inherited from class org.apache.activemq.filter.DestinationMapEntry
destination -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbaseConfiguration(Broker broker, BaseDestination destination) voidbaseUpdate(BaseDestination destination) voidbaseUpdate(BaseDestination destination, Set<String> includedProperties) voidvoidvoidconfigure(Broker broker, SystemUsage memoryManager, DurableTopicSubscription sub) voidconfigure(Broker broker, SystemUsage memoryManager, QueueBrowserSubscription sub) voidconfigure(Broker broker, SystemUsage memoryManager, QueueSubscription sub) voidconfigure(Broker broker, SystemUsage memoryManager, TopicSubscription subscription) voidconfigurePrefetch(Subscription subscription) longintintintGet the durableTopicPrefetchlonglonglongDeprecated.intintintintintintintlonglongintintGet the queueBrowserPrefetchintGet the queuePrefetchlongintintintGet the topicPrefetchbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanReturns true if the original message body should be included when applicable for advisory messagesbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidsetAdvancedMessageStatisticsEnabled(boolean advancedMessageStatisticsEnabled) voidsetAdvancedNetworkStatisticsEnabled(boolean advancedNetworkStatisticsEnabled) voidsetAdvisoryForConsumed(boolean advisoryForConsumed) voidsetAdvisoryForDelivery(boolean advisoryForDelivery) voidsetAdvisoryForDiscardingMessages(boolean advisoryForDiscardingMessages) voidsetAdvisoryForDispatched(boolean advisoryForDispatched) voidsetAdvisoryForFastProducers(boolean advisoryForFastProducers) voidsetAdvisoryForSlowConsumers(boolean advisoryForSlowConsumers) voidsetAdvisoryWhenFull(boolean advisoryWhenFull) voidsetAllConsumersExclusiveByDefault(boolean allConsumersExclusiveByDefault) voidsetAlwaysRetroactive(boolean alwaysRetroactive) voidsetBlockedProducerWarningInterval(long blockedProducerWarningInterval) Set's the interval at which warnings about producers being blocked by resource usage will be triggered.voidsetConsumersBeforeDispatchStarts(int consumersBeforeDispatchStarts) voidsetCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark) voidsetDeadLetterStrategy(DeadLetterStrategy deadLetterStrategy) Sets the policy used to determine which dead letter queue destination should be usedvoidsetDispatchPolicy(DispatchPolicy policy) voidsetDoOptimzeMessageStorage(boolean doOptimzeMessageStorage) voidsetDurableTopicPrefetch(int durableTopicPrefetch) Set the durableTopicPrefetchvoidsetEnableAudit(boolean enableAudit) voidsetExpireMessagesPeriod(long expireMessagesPeriod) voidsetGcInactiveDestinations(boolean gcInactiveDestinations) voidsetGcWithNetworkConsumers(boolean gcWithNetworkConsumers) voidsetInactiveTimeoutBeforeGC(long inactiveTimeoutBeforeGC) Sets the amount of time a destination is inactive before it is marked for GCvoidsetInactiveTimoutBeforeGC(long inactiveTimoutBeforeGC) Deprecated.usesetInactiveTimeoutBeforeGC(long)instead.voidsetIncludeBodyForAdvisory(boolean includeBodyForAdvisory) Sets if the original message body should be included when applicable for advisory messagesvoidsetLazyDispatch(boolean lazyDispatch) voidsetMaxAuditDepth(int maxAuditDepth) voidsetMaxBrowsePageSize(int maxPageSize) voidsetMaxDestinations(int maxDestinations) Sets the maximum number of destinations that can be createdvoidsetMaxExpirePageSize(int maxExpirePageSize) voidsetMaxPageSize(int maxPageSize) voidsetMaxProducersToAudit(int maxProducersToAudit) voidsetMaxQueueAuditDepth(int maxQueueAuditDepth) voidsetMemoryLimit(long memoryLimit) When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be usedvoidsetMessageEvictionStrategy(MessageEvictionStrategy messageEvictionStrategy) Sets the eviction strategy used to decide which message to evict when the slow consumer needs to discard messagesvoidsetMessageGroupMapFactory(MessageGroupMapFactory messageGroupMapFactory) Sets the factory used to create new instances of {MessageGroupMap} used to implement the Message Groups functionality.voidsetMessageGroupMapFactoryType(String messageGroupMapFactoryType) voidsetMessageInterceptorStrategy(MessageInterceptorStrategy messageInterceptorStrategy) voidsetMinimumMessageSize(long minimumMessageSize) voidsetNetworkBridgeFilterFactory(NetworkBridgeFilterFactory networkBridgeFilterFactory) voidsetOptimizedDispatch(boolean optimizedDispatch) voidsetOptimizeMessageStoreInFlightLimit(int optimizeMessageStoreInFlightLimit) voidsetPendingDurableSubscriberPolicy(PendingDurableSubscriberMessageStoragePolicy pendingDurableSubscriberPolicy) voidsetPendingMessageLimitStrategy(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).voidsetPendingQueuePolicy(PendingQueueMessageStoragePolicy pendingQueuePolicy) voidsetPendingSubscriberPolicy(PendingSubscriberMessageStoragePolicy pendingSubscriberPolicy) voidsetPersistJMSRedelivered(boolean val) voidsetPrioritizedMessages(boolean prioritizedMessages) voidsetProducerFlowControl(boolean producerFlowControl) voidsetQueueBrowserPrefetch(int queueBrowserPrefetch) Set the queueBrowserPrefetchvoidsetQueuePrefetch(int queuePrefetch) Set the queuePrefetchvoidsetReduceMemoryFootprint(boolean reduceMemoryFootprint) voidsetSendAdvisoryIfNoConsumers(boolean sendAdvisoryIfNoConsumers) Sends an advisory message if a non-persistent message is sent and there are no active consumersvoidsetSendDuplicateFromStoreToDLQ(boolean sendDuplicateFromStoreToDLQ) Sends a copy of message to DLQ if a duplicate messages are paged-in from the messages storevoidsetSendFailIfNoSpace(boolean val) voidsetSendFailIfNoSpaceAfterTimeout(long sendFailIfNoSpaceAfterTimeout) voidsetSlowConsumerStrategy(SlowConsumerStrategy slowConsumerStrategy) voidsetStoreUsageHighWaterMark(int storeUsageHighWaterMark) voidsetStrictOrderDispatch(boolean strictOrderDispatch) voidsetSubscriptionRecoveryPolicy(SubscriptionRecoveryPolicy subscriptionRecoveryPolicy) voidsetTimeBeforeDispatchStarts(int timeBeforeDispatchStarts) voidsetTopicPrefetch(int topicPrefetch) Set the topicPrefetchvoidsetUseCache(boolean useCache) voidsetUseConsumerPriority(boolean useConsumerPriority) voidsetUsePrefetchExtension(boolean usePrefetchExtension) voidsetUseTopicSubscriptionInflightStats(boolean useTopicSubscriptionInflightStats) toString()voidvoidUpdate a queue with this policy.voidvoidMethods inherited from class org.apache.activemq.filter.DestinationMapEntry
compareTo, getDestination, getValue, setDestination, setQueue, setTempQueue, setTempTopic, setTopic
-
Constructor Details
-
PolicyEntry
public PolicyEntry()
-
-
Method Details
-
configure
-
update
-
update
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
-
update
-
update
-
baseUpdate
-
baseUpdate
-
baseConfiguration
-
configure
-
configure
-
configure
-
configure
-
configurePrefetch
-
getDispatchPolicy
-
setDispatchPolicy
-
getSubscriptionRecoveryPolicy
-
setSubscriptionRecoveryPolicy
-
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
-
setDeadLetterStrategy
Sets the policy used to determine which dead letter queue destination should be used -
getPendingMessageLimitStrategy
-
setPendingMessageLimitStrategy
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
-
setMessageEvictionStrategy
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
-
setMessageGroupMapFactory
Sets the factory used to create new instances of {MessageGroupMap} used to implement the Message Groups functionality. -
getMessageGroupMapFactoryType
-
setMessageGroupMapFactoryType
-
getPendingDurableSubscriberPolicy
- Returns:
- the pendingDurableSubscriberPolicy
-
setPendingDurableSubscriberPolicy
public void setPendingDurableSubscriberPolicy(PendingDurableSubscriberMessageStoragePolicy pendingDurableSubscriberPolicy) - Parameters:
pendingDurableSubscriberPolicy- the pendingDurableSubscriberPolicy to set
-
getPendingQueuePolicy
- Returns:
- the pendingQueuePolicy
-
setPendingQueuePolicy
- Parameters:
pendingQueuePolicy- the pendingQueuePolicy to set
-
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
-
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.usegetInactiveTimeoutBeforeGC()instead.- Returns:
- the amount of time spent inactive before GC of the destination kicks in.
-
setInactiveTimoutBeforeGC
Deprecated.usesetInactiveTimeoutBeforeGC(long)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
-
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
-
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) -
setMessageInterceptorStrategy
-
getMessageInterceptorStrategy
-
isAdvancedNetworkStatisticsEnabled
public boolean isAdvancedNetworkStatisticsEnabled() -
setAdvancedNetworkStatisticsEnabled
public void setAdvancedNetworkStatisticsEnabled(boolean advancedNetworkStatisticsEnabled) -
isAdvancedMessageStatisticsEnabled
public boolean isAdvancedMessageStatisticsEnabled() -
setAdvancedMessageStatisticsEnabled
public void setAdvancedMessageStatisticsEnabled(boolean advancedMessageStatisticsEnabled)
-
getInactiveTimeoutBeforeGC()instead.