|
||||||||||
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
|
static long |
DEFAULT_INACTIVE_TIMEOUT_BEFORE_GC
|
protected ActiveMQDestination |
destination
|
protected DestinationStatistics |
destinationStatistics
|
static long |
EXPIRE_MESSAGE_PERIOD
|
protected long |
expireMessagesPeriod
|
static int |
MAX_AUDIT_DEPTH
|
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 |
static int |
MAX_PRODUCERS_TO_AUDIT
|
protected MemoryUsage |
memoryUsage
|
protected Broker |
regionBroker
|
protected MessageStore |
store
|
protected int |
storeUsageHighWaterMark
|
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 |
addSubscription(ConnectionContext context,
Subscription sub)
|
boolean |
canGC()
|
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()
|
long |
getInactiveTimoutBeforeGC()
|
protected abstract org.slf4j.Logger |
getLog()
|
int |
getMaxAuditDepth()
|
int |
getMaxBrowsePageSize()
|
int |
getMaxExpirePageSize()
|
int |
getMaxPageSize()
|
int |
getMaxProducersToAudit()
|
MemoryUsage |
getMemoryUsage()
|
MessageStore |
getMessageStore()
|
int |
getMinimumMessageSize()
|
java.lang.String |
getName()
|
SlowConsumerStrategy |
getSlowConsumerStrategy()
|
int |
getStoreUsageHighWaterMark()
|
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 |
isGcIfInactive()
|
boolean |
isLazyDispatch()
|
boolean |
isPrioritizedMessages()
|
boolean |
isProducerFlowControl()
|
protected boolean |
isReduceMemoryFootprint()
|
boolean |
isSendAdvisoryIfNoConsumers()
|
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. |
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 |
removeSubscription(ConnectionContext context,
Subscription sub,
long lastDeliveredSequenceId)
|
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 |
setGcIfInactive(boolean gcIfInactive)
|
void |
setInactiveTimoutBeforeGC(long inactiveTimoutBeforeGC)
|
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 |
setPrioritizedMessages(boolean prioritizedMessages)
|
void |
setProducerFlowControl(boolean producerFlowControl)
|
void |
setReduceMemoryFootprint(boolean reduceMemoryFootprint)
|
void |
setSendAdvisoryIfNoConsumers(boolean sendAdvisoryIfNoConsumers)
|
void |
setSlowConsumerStrategy(SlowConsumerStrategy slowConsumerStrategy)
|
void |
setStoreUsageHighWaterMark(int storeUsageHighWaterMark)
|
void |
setUseCache(boolean useCache)
|
void |
slowConsumer(ConnectionContext context,
Subscription subs)
Called when there is a slow consumer |
protected void |
waitForSpace(ConnectionContext context,
Usage<?> usage,
int highWaterMark,
java.lang.String warning)
|
protected void |
waitForSpace(ConnectionContext context,
Usage<?> usage,
java.lang.String warning)
|
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, browse, gc, getConsumers, messageExpired, 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
public static final long DEFAULT_INACTIVE_TIMEOUT_BEFORE_GC
public static final int MAX_PRODUCERS_TO_AUDIT
public static final int MAX_AUDIT_DEPTH
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
protected int storeUsageHighWaterMark
Constructor Detail |
---|
public BaseDestination(BrokerService brokerService, MessageStore store, ActiveMQDestination destination, DestinationStatistics parentStats) throws java.lang.Exception
broker
- store
- destination
- parentStats
-
java.lang.Exception
Method Detail |
---|
public void initialize() throws java.lang.Exception
java.lang.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 java.lang.Exception
addProducer
in interface Destination
java.lang.Exception
public void removeProducer(ConnectionContext context, ProducerInfo info) throws java.lang.Exception
removeProducer
in interface Destination
java.lang.Exception
public void addSubscription(ConnectionContext context, Subscription sub) throws java.lang.Exception
addSubscription
in interface Destination
java.lang.Exception
public void removeSubscription(ConnectionContext context, Subscription sub, long lastDeliveredSequenceId) throws java.lang.Exception
removeSubscription
in interface Destination
java.lang.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 java.lang.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, Subscription sub, 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 java.io.IOException
dispose
in interface Destination
java.io.IOException
protected void onMessageWithNoConsumers(ConnectionContext context, Message msg) throws java.lang.Exception
java.lang.Exception
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws java.lang.Exception
Destination
processDispatchNotification
in interface Destination
java.lang.Exception
public final int getStoreUsageHighWaterMark()
public void setStoreUsageHighWaterMark(int storeUsageHighWaterMark)
protected final void waitForSpace(ConnectionContext context, Usage<?> usage, java.lang.String warning) throws java.io.IOException, java.lang.InterruptedException, javax.jms.ResourceAllocationException
java.io.IOException
java.lang.InterruptedException
javax.jms.ResourceAllocationException
protected final void waitForSpace(ConnectionContext context, Usage<?> usage, int highWaterMark, java.lang.String warning) throws java.io.IOException, java.lang.InterruptedException, javax.jms.ResourceAllocationException
java.io.IOException
java.lang.InterruptedException
javax.jms.ResourceAllocationException
protected abstract org.slf4j.Logger getLog()
public void setSlowConsumerStrategy(SlowConsumerStrategy slowConsumerStrategy)
public SlowConsumerStrategy getSlowConsumerStrategy()
getSlowConsumerStrategy
in interface Destination
public boolean isPrioritizedMessages()
isPrioritizedMessages
in interface Destination
public void setPrioritizedMessages(boolean prioritizedMessages)
public long getInactiveTimoutBeforeGC()
public void setInactiveTimoutBeforeGC(long inactiveTimoutBeforeGC)
inactiveTimoutBeforeGC
- the inactiveTimoutBeforeGC to setpublic boolean isGcIfInactive()
public void setGcIfInactive(boolean gcIfInactive)
gcIfInactive
- the gcIfInactive to setpublic void markForGC(long timeStamp)
public boolean canGC()
public void setReduceMemoryFootprint(boolean reduceMemoryFootprint)
protected boolean isReduceMemoryFootprint()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |