|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.broker.region.AbstractRegion
public abstract class AbstractRegion
Field Summary | |
---|---|
protected boolean |
autoCreateDestinations
|
protected RegionBroker |
broker
|
protected java.util.Map |
consumerChangeMutexMap
|
protected DestinationFactory |
destinationFactory
|
protected DestinationMap |
destinationMap
|
protected edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap |
destinations
|
protected java.lang.Object |
destinationsMutex
|
protected DestinationStatistics |
destinationStatistics
|
protected UsageManager |
memoryManager
|
protected edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap |
subscriptions
|
protected TaskRunnerFactory |
taskRunnerFactory
|
Constructor Summary | |
---|---|
AbstractRegion(RegionBroker broker,
DestinationStatistics destinationStatistics,
UsageManager memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
|
Method Summary | |
---|---|
void |
acknowledge(ConnectionContext context,
MessageAck ack)
Used to acknowledge the receipt of a message by a client. |
Subscription |
addConsumer(ConnectionContext context,
ConsumerInfo info)
Adds a consumer. |
Destination |
addDestination(ConnectionContext context,
ActiveMQDestination destination)
Used to create a destination. |
protected Destination |
createDestination(ConnectionContext context,
ActiveMQDestination destination)
|
protected abstract Subscription |
createSubscription(ConnectionContext context,
ConsumerInfo info)
|
protected void |
destroySubscription(Subscription sub)
|
void |
gc()
|
java.util.Map |
getDestinationMap()
Returns a copy of the current destinations available in the region |
java.util.Set |
getDestinations(ActiveMQDestination destination)
Provide an exact or wildcard lookup of destinations in the region |
java.util.Set |
getDurableDestinations()
Get all the Destinations that are in storage |
protected java.util.Set |
getInactiveDestinations()
|
boolean |
isAutoCreateDestinations()
|
protected Destination |
lookup(ConnectionContext context,
ActiveMQDestination destination)
|
Response |
messagePull(ConnectionContext context,
MessagePull pull)
Allows a consumer to pull a message from a queue |
void |
processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
Process a notification of a dispatch - used by a Slave Broker |
void |
removeConsumer(ConnectionContext context,
ConsumerInfo info)
Removes a consumer. |
void |
removeDestination(ConnectionContext context,
ActiveMQDestination destination,
long timeout)
Used to destroy a destination. |
void |
removeSubscription(ConnectionContext context,
RemoveSubscriptionInfo info)
Deletes a durable subscription. |
void |
send(ConnectionContext context,
Message messageSend)
Send a message to the broker to using the specified destination. |
void |
setAutoCreateDestinations(boolean autoCreateDestinations)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap destinations
protected final DestinationMap destinationMap
protected final edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap subscriptions
protected final UsageManager memoryManager
protected final DestinationFactory destinationFactory
protected final DestinationStatistics destinationStatistics
protected final RegionBroker broker
protected boolean autoCreateDestinations
protected final TaskRunnerFactory taskRunnerFactory
protected final java.lang.Object destinationsMutex
protected final java.util.Map consumerChangeMutexMap
Constructor Detail |
---|
public AbstractRegion(RegionBroker broker, DestinationStatistics destinationStatistics, UsageManager memoryManager, TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory)
Method Detail |
---|
public void start() throws java.lang.Exception
start
in interface Service
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface Service
java.lang.Exception
public Destination addDestination(ConnectionContext context, ActiveMQDestination destination) throws java.lang.Exception
Region
addDestination
in interface Region
destination
- the destination to create.
java.lang.Exception
- TODOpublic void removeDestination(ConnectionContext context, ActiveMQDestination destination, long timeout) throws java.lang.Exception
Region
removeDestination
in interface Region
context
- the environment the operation is being executed under.destination
- what is being removed from the broker.timeout
- the max amount of time to wait for the destination to quiesce
java.lang.Exception
- TODOpublic java.util.Set getDestinations(ActiveMQDestination destination)
getDestinations
in interface Region
public java.util.Map getDestinationMap()
Region
getDestinationMap
in interface Region
public Subscription addConsumer(ConnectionContext context, ConsumerInfo info) throws java.lang.Exception
Region
addConsumer
in interface Region
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic java.util.Set getDurableDestinations()
protected java.util.Set getInactiveDestinations()
public void removeConsumer(ConnectionContext context, ConsumerInfo info) throws java.lang.Exception
Region
removeConsumer
in interface Region
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOprotected void destroySubscription(Subscription sub)
public void removeSubscription(ConnectionContext context, RemoveSubscriptionInfo info) throws java.lang.Exception
Region
removeSubscription
in interface Region
context
- the environment the operation is being executed under.info
- TODO
java.lang.Exception
- TODOpublic void send(ConnectionContext context, Message messageSend) throws java.lang.Exception
Region
send
in interface Region
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic void acknowledge(ConnectionContext context, MessageAck ack) throws java.lang.Exception
Region
acknowledge
in interface Region
context
- the environment the operation is being executed under.
java.lang.Exception
- TODOpublic Response messagePull(ConnectionContext context, MessagePull pull) throws java.lang.Exception
Region
messagePull
in interface Region
java.lang.Exception
protected Destination lookup(ConnectionContext context, ActiveMQDestination destination) throws java.lang.Exception
java.lang.Exception
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification) throws java.lang.Exception
Region
processDispatchNotification
in interface Region
java.lang.Exception
- TODOpublic void gc()
gc
in interface Region
protected abstract Subscription createSubscription(ConnectionContext context, ConsumerInfo info) throws java.lang.Exception
java.lang.Exception
protected Destination createDestination(ConnectionContext context, ActiveMQDestination destination) throws java.lang.Exception
java.lang.Exception
public boolean isAutoCreateDestinations()
public void setAutoCreateDestinations(boolean autoCreateDestinations)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |