|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.broker.region.BaseDestination
public abstract class BaseDestination
Field Summary | |
---|---|
protected long |
blockedProducerWarningInterval
|
protected Broker |
broker
|
protected BrokerService |
brokerService
|
protected int |
cursorMemoryHighWaterMark
|
protected DeadLetterStrategy |
deadLetterStrategy
|
protected ActiveMQDestination |
destination
|
protected DestinationStatistics |
destinationStatistics
|
static long |
EXPIRE_MESSAGE_PERIOD
|
protected long |
expireMessagesPeriod
|
static int |
MAX_BROWSE_PAGE_SIZE
|
static int |
MAX_PAGE_SIZE
The maximum number of messages to page in to the destination from persistent storage |
protected MemoryUsage |
memoryUsage
|
protected Broker |
regionBroker
|
protected MessageStore |
store
|
protected SystemUsage |
systemUsage
|
protected boolean |
warnOnProducerFlowControl
|
Fields inherited from interface org.apache.activemq.broker.region.Destination |
---|
DEFAULT_BLOCKED_PRODUCER_WARNING_INTERVAL, DEFAULT_DEAD_LETTER_STRATEGY |
Constructor Summary | |
---|---|
BaseDestination(BrokerService brokerService,
MessageStore store,
ActiveMQDestination destination,
DestinationStatistics parentStats)
|
Method Summary | |
---|---|
void |
addProducer(ConnectionContext context,
ProducerInfo info)
|
void |
dispose(ConnectionContext context)
|
void |
fastProducer(ConnectionContext context,
ProducerInfo producerInfo)
Called to notify a producer is too fast |
ActiveMQDestination |
getActiveMQDestination()
|
long |
getBlockedProducerWarningInterval()
|
int |
getCursorMemoryHighWaterMark()
|
DeadLetterStrategy |
getDeadLetterStrategy()
|
protected long |
getDestinationSequenceId()
|
DestinationStatistics |
getDestinationStatistics()
|
long |
getExpireMessagesPeriod()
|
int |
getMaxAuditDepth()
|
int |
getMaxBrowsePageSize()
|
int |
getMaxExpirePageSize()
|
int |
getMaxPageSize()
|
int |
getMaxProducersToAudit()
|
MemoryUsage |
getMemoryUsage()
|
MessageStore |
getMessageStore()
|
int |
getMinimumMessageSize()
|
String |
getName()
|
void |
initialize()
initialize the destination |
boolean |
isActive()
|
boolean |
isAdvisdoryForFastProducers()
|
boolean |
isAdvisoryForConsumed()
|
boolean |
isAdvisoryForDelivery()
|
boolean |
isAdvisoryForDiscardingMessages()
|
boolean |
isAdvisoryForSlowConsumers()
|
boolean |
isAdvisoryWhenFull()
|
boolean |
isEnableAudit()
|
void |
isFull(ConnectionContext context,
Usage usage)
Called when a Usage reaches a limit |
boolean |
isLazyDispatch()
|
boolean |
isProducerFlowControl()
|
boolean |
isSendAdvisoryIfNoConsumers()
|
boolean |
isUseCache()
|
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,
MessageReference messageReference)
Called when a message is discarded - e.g. |
protected void |
onMessageWithNoConsumers(ConnectionContext context,
Message msg)
Provides a hook to allow messages with no consumer to be processed in some way - such as to send to a dead letter queue or something.. |
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 |
setAdvisdoryForFastProducers(boolean advisdoryForFastProducers)
|
void |
setAdvisoryForConsumed(boolean advisoryForConsumed)
|
void |
setAdvisoryForDelivery(boolean advisoryForDelivery)
|
void |
setAdvisoryForDiscardingMessages(boolean advisoryForDiscardingMessages)
|
void |
setAdvisoryForSlowConsumers(boolean advisoryForSlowConsumers)
|
void |
setAdvisoryWhenFull(boolean advisoryWhenFull)
|
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 |
setDeadLetterStrategy(DeadLetterStrategy deadLetterStrategy)
set the dead letter strategy |
void |
setEnableAudit(boolean enableAudit)
|
void |
setExpireMessagesPeriod(long expireMessagesPeriod)
|
void |
setLazyDispatch(boolean lazyDispatch)
set the lazy dispatch - default is false |
void |
setMaxAuditDepth(int maxAuditDepth)
|
void |
setMaxBrowsePageSize(int maxPageSize)
|
void |
setMaxExpirePageSize(int maxPageSize)
|
void |
setMaxPageSize(int maxPageSize)
|
void |
setMaxProducersToAudit(int maxProducersToAudit)
|
void |
setMinimumMessageSize(int minimumMessageSize)
|
void |
setProducerFlowControl(boolean producerFlowControl)
|
void |
setSendAdvisoryIfNoConsumers(boolean sendAdvisoryIfNoConsumers)
|
void |
setUseCache(boolean useCache)
|
void |
slowConsumer(ConnectionContext context,
Subscription subs)
Called when there is a slow consumer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.activemq.broker.region.Destination |
---|
acknowledge, addSubscription, browse, gc, getConsumers, messageExpired, removeSubscription, send, wakeup |
Methods inherited from interface org.apache.activemq.Service |
---|
start, stop |
Methods inherited from interface org.apache.activemq.thread.Task |
---|
iterate |
Field Detail |
---|
public static final int MAX_PAGE_SIZE
public static final int MAX_BROWSE_PAGE_SIZE
public static final long EXPIRE_MESSAGE_PERIOD
protected final ActiveMQDestination destination
protected final Broker broker
protected final MessageStore store
protected SystemUsage systemUsage
protected MemoryUsage memoryUsage
protected boolean warnOnProducerFlowControl
protected long blockedProducerWarningInterval
protected final DestinationStatistics destinationStatistics
protected final BrokerService brokerService
protected final Broker regionBroker
protected DeadLetterStrategy deadLetterStrategy
protected long expireMessagesPeriod
protected int cursorMemoryHighWaterMark
Constructor Detail |
---|
public BaseDestination(BrokerService brokerService, MessageStore store, ActiveMQDestination destination, DestinationStatistics parentStats) throws Exception
broker
- store
- destination
- parentStats
-
Exception
Method Detail |
---|
public void initialize() throws Exception
Exception
public boolean isProducerFlowControl()
isProducerFlowControl
in interface Destination
public void setProducerFlowControl(boolean producerFlowControl)
setProducerFlowControl
in interface Destination
producerFlowControl
- the producerFlowControl to setpublic void setBlockedProducerWarningInterval(long blockedProducerWarningInterval)
setBlockedProducerWarningInterval
in interface Destination
blockedProducerWarningInterval
- the interval at which warning about
blocked producers will be triggered.public long getBlockedProducerWarningInterval()
getBlockedProducerWarningInterval
in interface Destination
public int getMaxProducersToAudit()
getMaxProducersToAudit
in interface Destination
public void setMaxProducersToAudit(int maxProducersToAudit)
setMaxProducersToAudit
in interface Destination
maxProducersToAudit
- the maxProducersToAudit to setpublic int getMaxAuditDepth()
getMaxAuditDepth
in interface Destination
public void setMaxAuditDepth(int maxAuditDepth)
setMaxAuditDepth
in interface Destination
maxAuditDepth
- the maxAuditDepth to setpublic boolean isEnableAudit()
isEnableAudit
in interface Destination
public void setEnableAudit(boolean enableAudit)
setEnableAudit
in interface Destination
enableAudit
- the enableAudit to setpublic void addProducer(ConnectionContext context, ProducerInfo info) throws Exception
addProducer
in interface Destination
Exception
public void removeProducer(ConnectionContext context, ProducerInfo info) throws Exception
removeProducer
in interface Destination
Exception
public final MemoryUsage getMemoryUsage()
getMemoryUsage
in interface Destination
public DestinationStatistics getDestinationStatistics()
getDestinationStatistics
in interface Destination
public ActiveMQDestination getActiveMQDestination()
getActiveMQDestination
in interface Destination
public final String getName()
getName
in interface Destination
public final MessageStore getMessageStore()
getMessageStore
in interface Destination
public final boolean isActive()
isActive
in interface Destination
public int getMaxPageSize()
getMaxPageSize
in interface Destination
public void setMaxPageSize(int maxPageSize)
setMaxPageSize
in interface Destination
public int getMaxBrowsePageSize()
getMaxBrowsePageSize
in interface Destination
public void setMaxBrowsePageSize(int maxPageSize)
setMaxBrowsePageSize
in interface Destination
public int getMaxExpirePageSize()
public void setMaxExpirePageSize(int maxPageSize)
public void setExpireMessagesPeriod(long expireMessagesPeriod)
public long getExpireMessagesPeriod()
public boolean isUseCache()
isUseCache
in interface Destination
public void setUseCache(boolean useCache)
setUseCache
in interface Destination
public int getMinimumMessageSize()
getMinimumMessageSize
in interface Destination
public void setMinimumMessageSize(int minimumMessageSize)
setMinimumMessageSize
in interface Destination
public boolean isLazyDispatch()
isLazyDispatch
in interface Destination
public void setLazyDispatch(boolean lazyDispatch)
Destination
setLazyDispatch
in interface Destination
protected long getDestinationSequenceId()
public boolean isAdvisoryForSlowConsumers()
public void setAdvisoryForSlowConsumers(boolean advisoryForSlowConsumers)
advisoryForSlowConsumers
- the advisoryForSlowConsumers to setpublic boolean isAdvisoryForDiscardingMessages()
public void setAdvisoryForDiscardingMessages(boolean advisoryForDiscardingMessages)
advisoryForDiscardingMessages
- the advisoryForDiscardingMessages to
setpublic boolean isAdvisoryWhenFull()
public void setAdvisoryWhenFull(boolean advisoryWhenFull)
advisoryWhenFull
- the advisoryWhenFull to setpublic boolean isAdvisoryForDelivery()
public void setAdvisoryForDelivery(boolean advisoryForDelivery)
advisoryForDelivery
- the advisoryForDelivery to setpublic boolean isAdvisoryForConsumed()
public void setAdvisoryForConsumed(boolean advisoryForConsumed)
advisoryForConsumed
- the advisoryForConsumed to setpublic boolean isAdvisdoryForFastProducers()
public void setAdvisdoryForFastProducers(boolean advisdoryForFastProducers)
advisdoryForFastProducers
- the advisdoryForFastProducers to setpublic boolean isSendAdvisoryIfNoConsumers()
public void setSendAdvisoryIfNoConsumers(boolean sendAdvisoryIfNoConsumers)
public DeadLetterStrategy getDeadLetterStrategy()
getDeadLetterStrategy
in interface Destination
public void setDeadLetterStrategy(DeadLetterStrategy deadLetterStrategy)
deadLetterStrategy
- public int getCursorMemoryHighWaterMark()
getCursorMemoryHighWaterMark
in interface Destination
public void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark)
setCursorMemoryHighWaterMark
in interface Destination
public void messageConsumed(ConnectionContext context, MessageReference messageReference)
messageConsumed
in interface Destination
context
- messageReference
- public void messageDelivered(ConnectionContext context, MessageReference messageReference)
messageDelivered
in interface Destination
context
- messageReference
- public void messageDiscarded(ConnectionContext context, MessageReference messageReference)
messageDiscarded
in interface Destination
context
- messageReference
- public void slowConsumer(ConnectionContext context, Subscription subs)
slowConsumer
in interface Destination
context
- subs
- public void fastProducer(ConnectionContext context, ProducerInfo producerInfo)
fastProducer
in interface Destination
context
- producerInfo
- public void isFull(ConnectionContext context, Usage usage)
isFull
in interface Destination
context
- usage
- public void dispose(ConnectionContext context) throws IOException
dispose
in interface Destination
IOException
protected void onMessageWithNoConsumers(ConnectionContext context, Message msg) throws Exception
Exception
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws Exception
Destination
processDispatchNotification
in interface Destination
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |