Save This Page
Home » activemq-parent-5.3.1-source-release » org.apache » activemq » broker » region » policy » [javadoc | source]
    1   /**
    2    * Licensed to the Apache Software Foundation (ASF) under one or more
    3    * contributor license agreements.  See the NOTICE file distributed with
    4    * this work for additional information regarding copyright ownership.
    5    * The ASF licenses this file to You under the Apache License, Version 2.0
    6    * (the "License"); you may not use this file except in compliance with
    7    * the License.  You may obtain a copy of the License at
    8    *
    9    *      http://www.apache.org/licenses/LICENSE-2.0
   10    *
   11    * Unless required by applicable law or agreed to in writing, software
   12    * distributed under the License is distributed on an "AS IS" BASIS,
   13    * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   14    * See the License for the specific language governing permissions and
   15    * limitations under the License.
   16    */
   17   package org.apache.activemq.broker.region.policy;
   18   
   19   import org.apache.activemq.ActiveMQPrefetchPolicy;
   20   import org.apache.activemq.broker.Broker;
   21   import org.apache.activemq.broker.region.BaseDestination;
   22   import org.apache.activemq.broker.region.Destination;
   23   import org.apache.activemq.broker.region.DurableTopicSubscription;
   24   import org.apache.activemq.broker.region.Queue;
   25   import org.apache.activemq.broker.region.QueueBrowserSubscription;
   26   import org.apache.activemq.broker.region.QueueSubscription;
   27   import org.apache.activemq.broker.region.Topic;
   28   import org.apache.activemq.broker.region.TopicSubscription;
   29   import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
   30   import org.apache.activemq.broker.region.group.MessageGroupHashBucketFactory;
   31   import org.apache.activemq.broker.region.group.MessageGroupMapFactory;
   32   import org.apache.activemq.filter.DestinationMapEntry;
   33   import org.apache.activemq.usage.SystemUsage;
   34   import org.apache.commons.logging.Log;
   35   import org.apache.commons.logging.LogFactory;
   36   
   37   /**
   38    * Represents an entry in a {@link PolicyMap} for assigning policies to a
   39    * specific destination or a hierarchical wildcard area of destinations.
   40    * 
   41    * @org.apache.xbean.XBean
   42    * @version $Revision: 1.1 $
   43    */
   44   public class PolicyEntry extends DestinationMapEntry {
   45   
   46       private static final Log LOG = LogFactory.getLog(PolicyEntry.class);
   47       private DispatchPolicy dispatchPolicy;
   48       private SubscriptionRecoveryPolicy subscriptionRecoveryPolicy;
   49       private boolean sendAdvisoryIfNoConsumers;
   50       private DeadLetterStrategy deadLetterStrategy = Destination.DEFAULT_DEAD_LETTER_STRATEGY;
   51       private PendingMessageLimitStrategy pendingMessageLimitStrategy;
   52       private MessageEvictionStrategy messageEvictionStrategy;
   53       private long memoryLimit;
   54       private MessageGroupMapFactory messageGroupMapFactory;
   55       private PendingQueueMessageStoragePolicy pendingQueuePolicy;
   56       private PendingDurableSubscriberMessageStoragePolicy pendingDurableSubscriberPolicy;
   57       private PendingSubscriberMessageStoragePolicy pendingSubscriberPolicy;
   58       private int maxProducersToAudit=32;
   59       private int maxAuditDepth=2048;
   60       private int maxQueueAuditDepth=2048;
   61       private boolean enableAudit=true;
   62       private boolean producerFlowControl = true;
   63       private long blockedProducerWarningInterval = Destination.DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL;
   64       private boolean optimizedDispatch=false;
   65       private int maxPageSize=BaseDestination.MAX_PAGE_SIZE;
   66       private int maxBrowsePageSize=BaseDestination.MAX_BROWSE_PAGE_SIZE;
   67       private boolean useCache=true;
   68       private long minimumMessageSize=1024;
   69       private boolean useConsumerPriority=true;
   70       private boolean strictOrderDispatch=false;
   71       private boolean lazyDispatch=false;
   72       private int timeBeforeDispatchStarts = 0;
   73       private int consumersBeforeDispatchStarts = 0;
   74       private boolean advisoryForSlowConsumers;
   75       private boolean advisdoryForFastProducers;
   76       private boolean advisoryForDiscardingMessages;
   77       private boolean advisoryWhenFull;
   78       private boolean advisoryForDelivery;
   79       private boolean advisoryForConsumed;
   80       private long expireMessagesPeriod = BaseDestination.EXPIRE_MESSAGE_PERIOD;
   81       private int maxExpirePageSize = BaseDestination.MAX_BROWSE_PAGE_SIZE;
   82       private int queuePrefetch=ActiveMQPrefetchPolicy.DEFAULT_QUEUE_PREFETCH;
   83       private int queueBrowserPrefetch=ActiveMQPrefetchPolicy.DEFAULT_QUEUE_BROWSER_PREFETCH;
   84       private int topicPrefetch=ActiveMQPrefetchPolicy.DEFAULT_TOPIC_PREFETCH;
   85       private int durableTopicPrefetch=ActiveMQPrefetchPolicy.DEFAULT_DURABLE_TOPIC_PREFETCH;
   86       private int cursorMemoryHighWaterMark=70;
   87       
   88      
   89       public void configure(Broker broker,Queue queue) {
   90           baseConfiguration(queue);
   91           if (dispatchPolicy != null) {
   92               queue.setDispatchPolicy(dispatchPolicy);
   93           }
   94           queue.setDeadLetterStrategy(getDeadLetterStrategy());
   95           queue.setMessageGroupMapFactory(getMessageGroupMapFactory());
   96           if (memoryLimit > 0) {
   97               queue.getMemoryUsage().setLimit(memoryLimit);
   98           }
   99           if (pendingQueuePolicy != null) {
  100               PendingMessageCursor messages = pendingQueuePolicy.getQueuePendingMessageCursor(broker,queue);
  101               queue.setMessages(messages);
  102           }
  103           
  104           queue.setUseConsumerPriority(isUseConsumerPriority());
  105           queue.setStrictOrderDispatch(isStrictOrderDispatch());
  106           queue.setOptimizedDispatch(isOptimizedDispatch());
  107           queue.setLazyDispatch(isLazyDispatch());
  108           queue.setTimeBeforeDispatchStarts(getTimeBeforeDispatchStarts());
  109           queue.setConsumersBeforeDispatchStarts(getConsumersBeforeDispatchStarts());
  110       }
  111   
  112       public void configure(Topic topic) {
  113           baseConfiguration(topic);
  114           if (dispatchPolicy != null) {
  115               topic.setDispatchPolicy(dispatchPolicy);
  116           }
  117           topic.setDeadLetterStrategy(getDeadLetterStrategy());
  118           if (subscriptionRecoveryPolicy != null) {
  119               topic.setSubscriptionRecoveryPolicy(subscriptionRecoveryPolicy.copy());
  120           }
  121           if (memoryLimit > 0) {
  122               topic.getMemoryUsage().setLimit(memoryLimit);
  123           }
  124           topic.setLazyDispatch(isLazyDispatch());
  125       }
  126       
  127       public void baseConfiguration(BaseDestination destination) {
  128           destination.setProducerFlowControl(isProducerFlowControl());
  129           destination.setBlockedProducerWarningInterval(getBlockedProducerWarningInterval());
  130           destination.setEnableAudit(isEnableAudit());
  131           destination.setMaxAuditDepth(getMaxQueueAuditDepth());
  132           destination.setMaxProducersToAudit(getMaxProducersToAudit());
  133           destination.setMaxPageSize(getMaxPageSize());
  134           destination.setMaxBrowsePageSize(getMaxBrowsePageSize());
  135           destination.setUseCache(isUseCache());
  136           destination.setMinimumMessageSize((int) getMinimumMessageSize());
  137           destination.setAdvisoryForConsumed(isAdvisoryForConsumed());
  138           destination.setAdvisoryForDelivery(isAdvisoryForDelivery());
  139           destination.setAdvisoryForDiscardingMessages(isAdvisoryForDiscardingMessages());
  140           destination.setAdvisoryForSlowConsumers(isAdvisoryForSlowConsumers());
  141           destination.setAdvisdoryForFastProducers(isAdvisdoryForFastProducers());
  142           destination.setAdvisoryWhenFull(isAdvisoryWhenFull());
  143           destination.setSendAdvisoryIfNoConsumers(sendAdvisoryIfNoConsumers);
  144           destination.setExpireMessagesPeriod(getExpireMessagesPeriod());
  145           destination.setMaxExpirePageSize(getMaxExpirePageSize());
  146           destination.setCursorMemoryHighWaterMark(getCursorMemoryHighWaterMark());
  147       }
  148   
  149       public void configure(Broker broker, SystemUsage memoryManager, TopicSubscription subscription) {
  150           //override prefetch size if not set by the Consumer
  151           int prefetch=subscription.getConsumerInfo().getPrefetchSize();
  152           if (prefetch == ActiveMQPrefetchPolicy.DEFAULT_TOPIC_PREFETCH){
  153               subscription.getConsumerInfo().setPrefetchSize(getTopicPrefetch());
  154           }
  155           if (pendingMessageLimitStrategy != null) {
  156               int value = pendingMessageLimitStrategy.getMaximumPendingMessageLimit(subscription);
  157               int consumerLimit = subscription.getInfo().getMaximumPendingMessageLimit();
  158               if (consumerLimit > 0) {
  159                   if (value < 0 || consumerLimit < value) {
  160                       value = consumerLimit;
  161                   }
  162               }
  163               if (value >= 0) {
  164                   if (LOG.isDebugEnabled()) {
  165                       LOG.debug("Setting the maximumPendingMessages size to: " + value + " for consumer: " + subscription.getInfo().getConsumerId());
  166                   }
  167                   subscription.setMaximumPendingMessages(value);
  168               }
  169           }
  170           if (messageEvictionStrategy != null) {
  171               subscription.setMessageEvictionStrategy(messageEvictionStrategy);
  172           }
  173           if (pendingSubscriberPolicy != null) {
  174               String name = subscription.getContext().getClientId() + "_" + subscription.getConsumerInfo().getConsumerId();
  175               int maxBatchSize = subscription.getConsumerInfo().getPrefetchSize();
  176               subscription.setMatched(pendingSubscriberPolicy.getSubscriberPendingMessageCursor(broker,name, maxBatchSize));
  177           }
  178       }
  179   
  180       public void configure(Broker broker, SystemUsage memoryManager, DurableTopicSubscription sub) {
  181           String clientId = sub.getSubscriptionKey().getClientId();
  182           String subName = sub.getSubscriptionKey().getSubscriptionName();
  183           int prefetch = sub.getPrefetchSize();
  184           sub.setCursorMemoryHighWaterMark(getCursorMemoryHighWaterMark());
  185           //override prefetch size if not set by the Consumer
  186           if (prefetch == ActiveMQPrefetchPolicy.DEFAULT_DURABLE_TOPIC_PREFETCH){
  187               sub.setPrefetchSize(getDurableTopicPrefetch());
  188           }
  189           if (pendingDurableSubscriberPolicy != null) {
  190               PendingMessageCursor cursor = pendingDurableSubscriberPolicy.getSubscriberPendingMessageCursor(broker,clientId, subName,prefetch,sub);
  191               cursor.setSystemUsage(memoryManager);
  192               sub.setPending(cursor);
  193           }
  194           sub.setMaxAuditDepth(getMaxAuditDepth());
  195           sub.setMaxProducersToAudit(getMaxProducersToAudit());
  196           
  197       }
  198       
  199       public void configure(Broker broker, SystemUsage memoryManager, QueueBrowserSubscription sub) {
  200          
  201           int prefetch = sub.getPrefetchSize();
  202           //override prefetch size if not set by the Consumer
  203           
  204           if (prefetch == ActiveMQPrefetchPolicy.DEFAULT_QUEUE_BROWSER_PREFETCH){
  205               sub.setPrefetchSize(getQueueBrowserPrefetch());
  206           }
  207           sub.setCursorMemoryHighWaterMark(getCursorMemoryHighWaterMark());
  208       }
  209       
  210       public void configure(Broker broker, SystemUsage memoryManager, QueueSubscription sub) {
  211           
  212           int prefetch = sub.getPrefetchSize();
  213           //override prefetch size if not set by the Consumer
  214           
  215           if (prefetch == ActiveMQPrefetchPolicy.DEFAULT_QUEUE_PREFETCH){
  216               sub.setPrefetchSize(getQueuePrefetch());
  217           }
  218           sub.setCursorMemoryHighWaterMark(getCursorMemoryHighWaterMark());
  219       }
  220   
  221       // Properties
  222       // -------------------------------------------------------------------------
  223       public DispatchPolicy getDispatchPolicy() {
  224           return dispatchPolicy;
  225       }
  226   
  227       public void setDispatchPolicy(DispatchPolicy policy) {
  228           this.dispatchPolicy = policy;
  229       }
  230   
  231       public SubscriptionRecoveryPolicy getSubscriptionRecoveryPolicy() {
  232           return subscriptionRecoveryPolicy;
  233       }
  234   
  235       public void setSubscriptionRecoveryPolicy(SubscriptionRecoveryPolicy subscriptionRecoveryPolicy) {
  236           this.subscriptionRecoveryPolicy = subscriptionRecoveryPolicy;
  237       }
  238   
  239       public boolean isSendAdvisoryIfNoConsumers() {
  240           return sendAdvisoryIfNoConsumers;
  241       }
  242   
  243       /**
  244        * Sends an advisory message if a non-persistent message is sent and there
  245        * are no active consumers
  246        */
  247       public void setSendAdvisoryIfNoConsumers(boolean sendAdvisoryIfNoConsumers) {
  248           this.sendAdvisoryIfNoConsumers = sendAdvisoryIfNoConsumers;
  249       }
  250   
  251       public DeadLetterStrategy getDeadLetterStrategy() {
  252           return deadLetterStrategy;
  253       }
  254   
  255       /**
  256        * Sets the policy used to determine which dead letter queue destination
  257        * should be used
  258        */
  259       public void setDeadLetterStrategy(DeadLetterStrategy deadLetterStrategy) {
  260           this.deadLetterStrategy = deadLetterStrategy;
  261       }
  262   
  263       public PendingMessageLimitStrategy getPendingMessageLimitStrategy() {
  264           return pendingMessageLimitStrategy;
  265       }
  266   
  267       /**
  268        * Sets the strategy to calculate the maximum number of messages that are
  269        * allowed to be pending on consumers (in addition to their prefetch sizes).
  270        * Once the limit is reached, non-durable topics can then start discarding
  271        * old messages. This allows us to keep dispatching messages to slow
  272        * consumers while not blocking fast consumers and discarding the messages
  273        * oldest first.
  274        */
  275       public void setPendingMessageLimitStrategy(PendingMessageLimitStrategy pendingMessageLimitStrategy) {
  276           this.pendingMessageLimitStrategy = pendingMessageLimitStrategy;
  277       }
  278   
  279       public MessageEvictionStrategy getMessageEvictionStrategy() {
  280           return messageEvictionStrategy;
  281       }
  282   
  283       /**
  284        * Sets the eviction strategy used to decide which message to evict when the
  285        * slow consumer needs to discard messages
  286        */
  287       public void setMessageEvictionStrategy(MessageEvictionStrategy messageEvictionStrategy) {
  288           this.messageEvictionStrategy = messageEvictionStrategy;
  289       }
  290   
  291       public long getMemoryLimit() {
  292           return memoryLimit;
  293       }
  294   
  295       /**
  296        * When set using Xbean, values of the form "20 Mb", "1024kb", and "1g" can be used
  297        * @org.apache.xbean.Property propertyEditor="org.apache.activemq.util.MemoryPropertyEditor"
  298        */
  299       public void setMemoryLimit(long memoryLimit) {
  300           this.memoryLimit = memoryLimit;
  301       }
  302   
  303       public MessageGroupMapFactory getMessageGroupMapFactory() {
  304           if (messageGroupMapFactory == null) {
  305               messageGroupMapFactory = new MessageGroupHashBucketFactory();
  306           }
  307           return messageGroupMapFactory;
  308       }
  309   
  310       /**
  311        * Sets the factory used to create new instances of {MessageGroupMap} used
  312        * to implement the <a
  313        * href="http://activemq.apache.org/message-groups.html">Message Groups</a>
  314        * functionality.
  315        */
  316       public void setMessageGroupMapFactory(MessageGroupMapFactory messageGroupMapFactory) {
  317           this.messageGroupMapFactory = messageGroupMapFactory;
  318       }
  319   
  320       /**
  321        * @return the pendingDurableSubscriberPolicy
  322        */
  323       public PendingDurableSubscriberMessageStoragePolicy getPendingDurableSubscriberPolicy() {
  324           return this.pendingDurableSubscriberPolicy;
  325       }
  326   
  327       /**
  328        * @param pendingDurableSubscriberPolicy the pendingDurableSubscriberPolicy
  329        *                to set
  330        */
  331       public void setPendingDurableSubscriberPolicy(PendingDurableSubscriberMessageStoragePolicy pendingDurableSubscriberPolicy) {
  332           this.pendingDurableSubscriberPolicy = pendingDurableSubscriberPolicy;
  333       }
  334   
  335       /**
  336        * @return the pendingQueuePolicy
  337        */
  338       public PendingQueueMessageStoragePolicy getPendingQueuePolicy() {
  339           return this.pendingQueuePolicy;
  340       }
  341   
  342       /**
  343        * @param pendingQueuePolicy the pendingQueuePolicy to set
  344        */
  345       public void setPendingQueuePolicy(PendingQueueMessageStoragePolicy pendingQueuePolicy) {
  346           this.pendingQueuePolicy = pendingQueuePolicy;
  347       }
  348   
  349       /**
  350        * @return the pendingSubscriberPolicy
  351        */
  352       public PendingSubscriberMessageStoragePolicy getPendingSubscriberPolicy() {
  353           return this.pendingSubscriberPolicy;
  354       }
  355   
  356       /**
  357        * @param pendingSubscriberPolicy the pendingSubscriberPolicy to set
  358        */
  359       public void setPendingSubscriberPolicy(PendingSubscriberMessageStoragePolicy pendingSubscriberPolicy) {
  360           this.pendingSubscriberPolicy = pendingSubscriberPolicy;
  361       }
  362   
  363       /**
  364        * @return true if producer flow control enabled
  365        */
  366       public boolean isProducerFlowControl() {
  367           return producerFlowControl;
  368       }
  369   
  370       /**
  371        * @param producerFlowControl
  372        */
  373       public void setProducerFlowControl(boolean producerFlowControl) {
  374           this.producerFlowControl = producerFlowControl;
  375       }
  376   
  377       /**
  378        * Set's the interval at which warnings about producers being blocked by
  379        * resource usage will be triggered. Values of 0 or less will disable
  380        * warnings
  381        * 
  382        * @param blockedProducerWarningInterval the interval at which warning about
  383        *            blocked producers will be triggered.
  384        */
  385       public void setBlockedProducerWarningInterval(long blockedProducerWarningInterval) {
  386           this.blockedProducerWarningInterval = blockedProducerWarningInterval;
  387       }
  388   
  389       /**
  390        * 
  391        * @return the interval at which warning about blocked producers will be
  392        *         triggered.
  393        */
  394       public long getBlockedProducerWarningInterval() {
  395           return blockedProducerWarningInterval;
  396       }
  397       
  398       /**
  399        * @return the maxProducersToAudit
  400        */
  401       public int getMaxProducersToAudit() {
  402           return maxProducersToAudit;
  403       }
  404   
  405       /**
  406        * @param maxProducersToAudit the maxProducersToAudit to set
  407        */
  408       public void setMaxProducersToAudit(int maxProducersToAudit) {
  409           this.maxProducersToAudit = maxProducersToAudit;
  410       }
  411   
  412       /**
  413        * @return the maxAuditDepth
  414        */
  415       public int getMaxAuditDepth() {
  416           return maxAuditDepth;
  417       }
  418   
  419       /**
  420        * @param maxAuditDepth the maxAuditDepth to set
  421        */
  422       public void setMaxAuditDepth(int maxAuditDepth) {
  423           this.maxAuditDepth = maxAuditDepth;
  424       }
  425   
  426       /**
  427        * @return the enableAudit
  428        */
  429       public boolean isEnableAudit() {
  430           return enableAudit;
  431       }
  432   
  433       /**
  434        * @param enableAudit the enableAudit to set
  435        */
  436       public void setEnableAudit(boolean enableAudit) {
  437           this.enableAudit = enableAudit;
  438       }
  439   
  440       public int getMaxQueueAuditDepth() {
  441           return maxQueueAuditDepth;
  442       }
  443   
  444       public void setMaxQueueAuditDepth(int maxQueueAuditDepth) {
  445           this.maxQueueAuditDepth = maxQueueAuditDepth;
  446       }
  447   
  448       public boolean isOptimizedDispatch() {
  449           return optimizedDispatch;
  450       }
  451   
  452       public void setOptimizedDispatch(boolean optimizedDispatch) {
  453           this.optimizedDispatch = optimizedDispatch;
  454       }
  455       
  456       public int getMaxPageSize() {
  457           return maxPageSize;
  458       }
  459   
  460       public void setMaxPageSize(int maxPageSize) {
  461           this.maxPageSize = maxPageSize;
  462       } 
  463       
  464       public int getMaxBrowsePageSize() {
  465           return maxBrowsePageSize;
  466       }
  467   
  468       public void setMaxBrowsePageSize(int maxPageSize) {
  469           this.maxBrowsePageSize = maxPageSize;
  470       } 
  471       
  472       public boolean isUseCache() {
  473           return useCache;
  474       }
  475   
  476       public void setUseCache(boolean useCache) {
  477           this.useCache = useCache;
  478       }
  479   
  480       public long getMinimumMessageSize() {
  481           return minimumMessageSize;
  482       }
  483   
  484       public void setMinimumMessageSize(long minimumMessageSize) {
  485           this.minimumMessageSize = minimumMessageSize;
  486       }   
  487       
  488       public boolean isUseConsumerPriority() {
  489           return useConsumerPriority;
  490       }
  491   
  492       public void setUseConsumerPriority(boolean useConsumerPriority) {
  493           this.useConsumerPriority = useConsumerPriority;
  494       }
  495   
  496       public boolean isStrictOrderDispatch() {
  497           return strictOrderDispatch;
  498       }
  499   
  500       public void setStrictOrderDispatch(boolean strictOrderDispatch) {
  501           this.strictOrderDispatch = strictOrderDispatch;
  502       }
  503   
  504       public boolean isLazyDispatch() {
  505           return lazyDispatch;
  506       }
  507   
  508       public void setLazyDispatch(boolean lazyDispatch) {
  509           this.lazyDispatch = lazyDispatch;
  510       }
  511   
  512       public int getTimeBeforeDispatchStarts() {
  513           return timeBeforeDispatchStarts;
  514       }
  515   
  516       public void setTimeBeforeDispatchStarts(int timeBeforeDispatchStarts) {
  517           this.timeBeforeDispatchStarts = timeBeforeDispatchStarts;
  518       }
  519   
  520       public int getConsumersBeforeDispatchStarts() {
  521           return consumersBeforeDispatchStarts;
  522       }
  523   
  524       public void setConsumersBeforeDispatchStarts(int consumersBeforeDispatchStarts) {
  525           this.consumersBeforeDispatchStarts = consumersBeforeDispatchStarts;
  526       }
  527   
  528       /**
  529        * @return the advisoryForSlowConsumers
  530        */
  531       public boolean isAdvisoryForSlowConsumers() {
  532           return advisoryForSlowConsumers;
  533       }
  534   
  535       /**
  536        * @param advisoryForSlowConsumers the advisoryForSlowConsumers to set
  537        */
  538       public void setAdvisoryForSlowConsumers(boolean advisoryForSlowConsumers) {
  539           this.advisoryForSlowConsumers = advisoryForSlowConsumers;
  540       }
  541   
  542       /**
  543        * @return the advisoryForDiscardingMessages
  544        */
  545       public boolean isAdvisoryForDiscardingMessages() {
  546           return advisoryForDiscardingMessages;
  547       }
  548   
  549       /**
  550        * @param advisoryForDiscardingMessages the advisoryForDiscardingMessages to set
  551        */
  552       public void setAdvisoryForDiscardingMessages(
  553               boolean advisoryForDiscardingMessages) {
  554           this.advisoryForDiscardingMessages = advisoryForDiscardingMessages;
  555       }
  556   
  557       /**
  558        * @return the advisoryWhenFull
  559        */
  560       public boolean isAdvisoryWhenFull() {
  561           return advisoryWhenFull;
  562       }
  563   
  564       /**
  565        * @param advisoryWhenFull the advisoryWhenFull to set
  566        */
  567       public void setAdvisoryWhenFull(boolean advisoryWhenFull) {
  568           this.advisoryWhenFull = advisoryWhenFull;
  569       }
  570   
  571       /**
  572        * @return the advisoryForDelivery
  573        */
  574       public boolean isAdvisoryForDelivery() {
  575           return advisoryForDelivery;
  576       }
  577   
  578       /**
  579        * @param advisoryForDelivery the advisoryForDelivery to set
  580        */
  581       public void setAdvisoryForDelivery(boolean advisoryForDelivery) {
  582           this.advisoryForDelivery = advisoryForDelivery;
  583       }
  584   
  585       /**
  586        * @return the advisoryForConsumed
  587        */
  588       public boolean isAdvisoryForConsumed() {
  589           return advisoryForConsumed;
  590       }
  591   
  592       /**
  593        * @param advisoryForConsumed the advisoryForConsumed to set
  594        */
  595       public void setAdvisoryForConsumed(boolean advisoryForConsumed) {
  596           this.advisoryForConsumed = advisoryForConsumed;
  597       }
  598       
  599       /**
  600        * @return the advisdoryForFastProducers
  601        */
  602       public boolean isAdvisdoryForFastProducers() {
  603           return advisdoryForFastProducers;
  604       }
  605   
  606       /**
  607        * @param advisdoryForFastProducers the advisdoryForFastProducers to set
  608        */
  609       public void setAdvisdoryForFastProducers(boolean advisdoryForFastProducers) {
  610           this.advisdoryForFastProducers = advisdoryForFastProducers;
  611       }
  612   
  613       public void setMaxExpirePageSize(int maxExpirePageSize) {
  614           this.maxExpirePageSize = maxExpirePageSize;
  615       }
  616       
  617       public int getMaxExpirePageSize() {
  618           return maxExpirePageSize;
  619       }
  620       
  621       public void setExpireMessagesPeriod(long expireMessagesPeriod) {
  622           this.expireMessagesPeriod = expireMessagesPeriod;
  623       }
  624       
  625       public long getExpireMessagesPeriod() {
  626           return expireMessagesPeriod;
  627       }
  628   
  629       /**
  630        * Get the queuePrefetch
  631        * @return the queuePrefetch
  632        */
  633       public int getQueuePrefetch() {
  634           return this.queuePrefetch;
  635       }
  636   
  637       /**
  638        * Set the queuePrefetch
  639        * @param queuePrefetch the queuePrefetch to set
  640        */
  641       public void setQueuePrefetch(int queuePrefetch) {
  642           this.queuePrefetch = queuePrefetch;
  643       }
  644   
  645       /**
  646        * Get the queueBrowserPrefetch
  647        * @return the queueBrowserPrefetch
  648        */
  649       public int getQueueBrowserPrefetch() {
  650           return this.queueBrowserPrefetch;
  651       }
  652   
  653       /**
  654        * Set the queueBrowserPrefetch
  655        * @param queueBrowserPrefetch the queueBrowserPrefetch to set
  656        */
  657       public void setQueueBrowserPrefetch(int queueBrowserPrefetch) {
  658           this.queueBrowserPrefetch = queueBrowserPrefetch;
  659       }
  660   
  661       /**
  662        * Get the topicPrefetch
  663        * @return the topicPrefetch
  664        */
  665       public int getTopicPrefetch() {
  666           return this.topicPrefetch;
  667       }
  668   
  669       /**
  670        * Set the topicPrefetch
  671        * @param topicPrefetch the topicPrefetch to set
  672        */
  673       public void setTopicPrefetch(int topicPrefetch) {
  674           this.topicPrefetch = topicPrefetch;
  675       }
  676   
  677       /**
  678        * Get the durableTopicPrefetch
  679        * @return the durableTopicPrefetch
  680        */
  681       public int getDurableTopicPrefetch() {
  682           return this.durableTopicPrefetch;
  683       }
  684   
  685       /**
  686        * Set the durableTopicPrefetch
  687        * @param durableTopicPrefetch the durableTopicPrefetch to set
  688        */
  689       public void setDurableTopicPrefetch(int durableTopicPrefetch) {
  690           this.durableTopicPrefetch = durableTopicPrefetch;
  691       }
  692       
  693       public int getCursorMemoryHighWaterMark() {
  694   		return this.cursorMemoryHighWaterMark;
  695   	}
  696   
  697   	public void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark) {
  698   		this.cursorMemoryHighWaterMark = cursorMemoryHighWaterMark;
  699   	}
  700   
  701   
  702   
  703   }

Save This Page
Home » activemq-parent-5.3.1-source-release » org.apache » activemq » broker » region » policy » [javadoc | source]