org.apache.activemq.broker.region
Interface Destination

All Superinterfaces:
Service, Task
All Known Implementing Classes:
BaseDestination, CompositeDestinationFilter, DestinationFilter, Queue, SelectorAwareVirtualTopicInterceptor, TempQueue, TempTopic, Topic, VirtualTopicInterceptor

public interface Destination
extends Service, Task


Field Summary
static long DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL
           
static DeadLetterStrategy DEFAULT_DEAD_LETTER_STRATEGY
           
 
Method Summary
 void acknowledge(ConnectionContext context, Subscription sub, MessageAck ack, MessageReference node)
           
 void addProducer(ConnectionContext context, ProducerInfo info)
           
 void addSubscription(ConnectionContext context, Subscription sub)
           
 Message[] browse()
           
 boolean canGC()
           
 void clearPendingMessages()
           
 void dispose(ConnectionContext context)
           
 void fastProducer(ConnectionContext context, ProducerInfo producerInfo)
          Called to notify a producer is too fast
 void gc()
           
 ActiveMQDestination getActiveMQDestination()
           
 long getBlockedProducerWarningInterval()
           
 List<Subscription> getConsumers()
           
 int getCursorMemoryHighWaterMark()
           
 DeadLetterStrategy getDeadLetterStrategy()
           
 DestinationStatistics getDestinationStatistics()
           
 long getInactiveTimoutBeforeGC()
           
 int getMaxAuditDepth()
           
 int getMaxBrowsePageSize()
           
 int getMaxPageSize()
           
 int getMaxProducersToAudit()
           
 MemoryUsage getMemoryUsage()
           
 MessageStore getMessageStore()
           
 int getMinimumMessageSize()
           
 String getName()
           
 SlowConsumerStrategy getSlowConsumerStrategy()
           
 boolean isActive()
           
 boolean isAlwaysRetroactive()
           
 boolean isDisposed()
           
 boolean isDoOptimzeMessageStorage()
           
 boolean isEnableAudit()
           
 void isFull(ConnectionContext context, Usage<?> usage)
          Called when a Usage reaches a limit
 boolean isLazyDispatch()
           
 boolean isPrioritizedMessages()
           
 boolean isProducerFlowControl()
           
 boolean isUseCache()
           
 void markForGC(long timeStamp)
           
 void messageConsumed(ConnectionContext context, MessageReference messageReference)
          called when message is consumed
 void messageDelivered(ConnectionContext context, MessageReference messageReference)
          Called when message is delivered to the broker
 void messageDiscarded(ConnectionContext context, Subscription sub, MessageReference messageReference)
          Called when a message is discarded - e.g.
 void messageExpired(ConnectionContext context, Subscription subs, MessageReference node)
          Inform the Destination a message has expired
 void processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
          called on Queues in slave mode to allow dispatch to follow subscription choice of master
 void removeProducer(ConnectionContext context, ProducerInfo info)
           
 void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId)
           
 void send(ProducerBrokerExchange producerExchange, Message messageSend)
           
 void setAlwaysRetroactive(boolean value)
           
 void setBlockedProducerWarningInterval(long blockedProducerWarningInterval)
          Set's the interval at which warnings about producers being blocked by resource usage will be triggered.
 void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark)
           
 void setDoOptimzeMessageStorage(boolean doOptimzeMessageStorage)
           
 void setEnableAudit(boolean enableAudit)
           
 void setLazyDispatch(boolean value)
          set the lazy dispatch - default is false
 void setMaxAuditDepth(int maxAuditDepth)
           
 void setMaxBrowsePageSize(int maxPageSize)
           
 void setMaxPageSize(int maxPageSize)
           
 void setMaxProducersToAudit(int maxProducersToAudit)
           
 void setMinimumMessageSize(int minimumMessageSize)
           
 void setProducerFlowControl(boolean value)
           
 void setUseCache(boolean useCache)
           
 void slowConsumer(ConnectionContext context, Subscription subs)
          Called when there is a slow consumer
 void wakeup()
          optionally called by a Subscriber - to inform the Destination its ready for more messages
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 
Methods inherited from interface org.apache.activemq.thread.Task
iterate
 

Field Detail

DEFAULT_DEAD_LETTER_STRATEGY

static final DeadLetterStrategy DEFAULT_DEAD_LETTER_STRATEGY

DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL

static final long DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL
See Also:
Constant Field Values
Method Detail

addSubscription

void addSubscription(ConnectionContext context,
                     Subscription sub)
                     throws Exception
Throws:
Exception

removeSubscription

void removeSubscription(ConnectionContext context,
                        Subscription sub,
                        long lastDeliveredSequenceId)
                        throws Exception
Throws:
Exception

addProducer

void addProducer(ConnectionContext context,
                 ProducerInfo info)
                 throws Exception
Throws:
Exception

removeProducer

void removeProducer(ConnectionContext context,
                    ProducerInfo info)
                    throws Exception
Throws:
Exception

send

void send(ProducerBrokerExchange producerExchange,
          Message messageSend)
          throws Exception
Throws:
Exception

acknowledge

void acknowledge(ConnectionContext context,
                 Subscription sub,
                 MessageAck ack,
                 MessageReference node)
                 throws IOException
Throws:
IOException

getInactiveTimoutBeforeGC

long getInactiveTimoutBeforeGC()

markForGC

void markForGC(long timeStamp)

canGC

boolean canGC()

gc

void gc()

getActiveMQDestination

ActiveMQDestination getActiveMQDestination()

getMemoryUsage

MemoryUsage getMemoryUsage()

dispose

void dispose(ConnectionContext context)
             throws IOException
Throws:
IOException

isDisposed

boolean isDisposed()

getDestinationStatistics

DestinationStatistics getDestinationStatistics()

getDeadLetterStrategy

DeadLetterStrategy getDeadLetterStrategy()

browse

Message[] browse()

getName

String getName()

getMessageStore

MessageStore getMessageStore()

isProducerFlowControl

boolean isProducerFlowControl()

setProducerFlowControl

void setProducerFlowControl(boolean value)

isAlwaysRetroactive

boolean isAlwaysRetroactive()

setAlwaysRetroactive

void setAlwaysRetroactive(boolean value)

setBlockedProducerWarningInterval

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

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

getMaxProducersToAudit

int getMaxProducersToAudit()

setMaxProducersToAudit

void setMaxProducersToAudit(int maxProducersToAudit)

getMaxAuditDepth

int getMaxAuditDepth()

setMaxAuditDepth

void setMaxAuditDepth(int maxAuditDepth)

isEnableAudit

boolean isEnableAudit()

setEnableAudit

void setEnableAudit(boolean enableAudit)

isActive

boolean isActive()

getMaxPageSize

int getMaxPageSize()

setMaxPageSize

void setMaxPageSize(int maxPageSize)

getMaxBrowsePageSize

int getMaxBrowsePageSize()

setMaxBrowsePageSize

void setMaxBrowsePageSize(int maxPageSize)

isUseCache

boolean isUseCache()

setUseCache

void setUseCache(boolean useCache)

getMinimumMessageSize

int getMinimumMessageSize()

setMinimumMessageSize

void setMinimumMessageSize(int minimumMessageSize)

getCursorMemoryHighWaterMark

int getCursorMemoryHighWaterMark()

setCursorMemoryHighWaterMark

void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark)

wakeup

void wakeup()
optionally called by a Subscriber - to inform the Destination its ready for more messages


isLazyDispatch

boolean isLazyDispatch()
Returns:
true if lazyDispatch is enabled

setLazyDispatch

void setLazyDispatch(boolean value)
set the lazy dispatch - default is false

Parameters:
value -

messageExpired

void messageExpired(ConnectionContext context,
                    Subscription subs,
                    MessageReference node)
Inform the Destination a message has expired

Parameters:
context -
subs -
node -

messageConsumed

void messageConsumed(ConnectionContext context,
                     MessageReference messageReference)
called when message is consumed

Parameters:
context -
messageReference -

messageDelivered

void messageDelivered(ConnectionContext context,
                      MessageReference messageReference)
Called when message is delivered to the broker

Parameters:
context -
messageReference -

messageDiscarded

void messageDiscarded(ConnectionContext context,
                      Subscription sub,
                      MessageReference messageReference)
Called when a message is discarded - e.g. running low on memory This will happen only if the policy is enabled - e.g. non durable topics

Parameters:
context -
messageReference -
sub -

slowConsumer

void slowConsumer(ConnectionContext context,
                  Subscription subs)
Called when there is a slow consumer

Parameters:
context -
subs -

fastProducer

void fastProducer(ConnectionContext context,
                  ProducerInfo producerInfo)
Called to notify a producer is too fast

Parameters:
context -
producerInfo -

isFull

void isFull(ConnectionContext context,
            Usage<?> usage)
Called when a Usage reaches a limit

Parameters:
context -
usage -

getConsumers

List<Subscription> getConsumers()

processDispatchNotification

void processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
                                 throws Exception
called on Queues in slave mode to allow dispatch to follow subscription choice of master

Parameters:
messageDispatchNotification -
Throws:
Exception

isPrioritizedMessages

boolean isPrioritizedMessages()

getSlowConsumerStrategy

SlowConsumerStrategy getSlowConsumerStrategy()

isDoOptimzeMessageStorage

boolean isDoOptimzeMessageStorage()

setDoOptimzeMessageStorage

void setDoOptimzeMessageStorage(boolean doOptimzeMessageStorage)

clearPendingMessages

void clearPendingMessages()


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