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:
java.lang.Comparable, org.springframework.beans.factory.InitializingBean

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.

Version:
$Revision: 1.1 $

Constructor Summary
PolicyEntry()
           
 
Method Summary
 void configure(Queue queue)
           
 void configure(Topic topic)
           
 void configure(TopicSubscription subscription)
           
 DeadLetterStrategy getDeadLetterStrategy()
           
 DispatchPolicy getDispatchPolicy()
           
 long getMemoryLimit()
           
 MessageEvictionStrategy getMessageEvictionStrategy()
           
 MessageGroupMapFactory getMessageGroupMapFactory()
           
 PendingMessageLimitStrategy getPendingMessageLimitStrategy()
           
 PendingQueueMessageStoragePolicy getPendingQueueMessageStoragePolicy()
           
 SubscriptionRecoveryPolicy getSubscriptionRecoveryPolicy()
           
 boolean isSendAdvisoryIfNoConsumers()
           
 void setDeadLetterStrategy(DeadLetterStrategy deadLetterStrategy)
          Sets the policy used to determine which dead letter queue destination should be used
 void setDispatchPolicy(DispatchPolicy policy)
           
 void setMemoryLimit(long memoryLimit)
           
 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 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 setPendingQueueMessageStoragePolicy(PendingQueueMessageStoragePolicy pendingQueueMessageStoragePolicy)
           
 void setSendAdvisoryIfNoConsumers(boolean sendAdvisoryIfNoConsumers)
          Sends an advisory message if a non-persistent message is sent and there are no active consumers
 void setSubscriptionRecoveryPolicy(SubscriptionRecoveryPolicy subscriptionRecoveryPolicy)
           
 
Methods inherited from class org.apache.activemq.filter.DestinationMapEntry
afterPropertiesSet, compareTo, getDestination, getValue, setDestination, setQueue, 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(Queue queue)

configure

public void configure(Topic topic)

configure

public void configure(TopicSubscription 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)

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.


getPendingQueueMessageStoragePolicy

public PendingQueueMessageStoragePolicy getPendingQueueMessageStoragePolicy()
Returns:
the pendingQueueMessageStoragePolicy

setPendingQueueMessageStoragePolicy

public void setPendingQueueMessageStoragePolicy(PendingQueueMessageStoragePolicy pendingQueueMessageStoragePolicy)
Parameters:
pendingQueueMessageStoragePolicy - the pendingQueueMessageStoragePolicy to set


Copyright © 2010 Apache Software Foundation. All Rights Reserved.