|
||||||||||
| 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 Map<ConsumerId,Object> |
consumerChangeMutexMap
|
protected DestinationFactory |
destinationFactory
|
protected DestinationMap |
destinationMap
|
protected Map<ActiveMQDestination,Destination> |
destinations
|
protected ReentrantReadWriteLock |
destinationsLock
|
protected DestinationStatistics |
destinationStatistics
|
protected boolean |
started
|
protected Map<ConsumerId,Subscription> |
subscriptions
|
protected TaskRunnerFactory |
taskRunnerFactory
|
protected SystemUsage |
usageManager
|
| Constructor Summary | |
|---|---|
AbstractRegion(RegionBroker broker,
DestinationStatistics destinationStatistics,
SystemUsage memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
|
|
| Method Summary | |
|---|---|
void |
acknowledge(ConsumerBrokerExchange consumerExchange,
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,
boolean createIfTemporary)
Used to create a destination. |
void |
addProducer(ConnectionContext context,
ProducerInfo info)
Adds a Producer. |
protected List<Subscription> |
addSubscriptionsForDestination(ConnectionContext context,
Destination dest)
|
protected Destination |
createDestination(ConnectionContext context,
ActiveMQDestination destination)
|
protected abstract Subscription |
createSubscription(ConnectionContext context,
ConsumerInfo info)
|
protected void |
destroySubscription(Subscription sub)
|
protected void |
dispose(ConnectionContext context,
Destination dest)
|
void |
gc()
|
Map<ActiveMQDestination,Destination> |
getDestinationMap()
Returns a reference to the concurrent hash map that holds known destinations, do not modify |
Set<Destination> |
getDestinations(ActiveMQDestination destination)
Provide an exact or wildcard lookup of destinations in the region |
Set |
getDurableDestinations()
Get all the Destinations that are in storage |
protected Set<ActiveMQDestination> |
getInactiveDestinations()
|
Map<ConsumerId,Subscription> |
getSubscriptions()
|
boolean |
isAutoCreateDestinations()
|
protected Destination |
lookup(ConnectionContext context,
ActiveMQDestination destination,
boolean createTemporary)
|
Response |
messagePull(ConnectionContext context,
MessagePull pull)
Allows a consumer to pull a message from a queue |
void |
processConsumerControl(ConsumerBrokerExchange consumerExchange,
ConsumerControl control)
|
void |
processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
Process a notification of a dispatch - used by a Slave Broker |
protected void |
processDispatchNotificationViaDestination(MessageDispatchNotification messageDispatchNotification)
|
void |
removeConsumer(ConnectionContext context,
ConsumerInfo info)
Removes a consumer. |
void |
removeDestination(ConnectionContext context,
ActiveMQDestination destination,
long timeout)
Used to destroy a destination. |
void |
removeProducer(ConnectionContext context,
ProducerInfo info)
Removes a Producer. |
void |
removeSubscription(ConnectionContext context,
RemoveSubscriptionInfo info)
Deletes a durable subscription. |
void |
send(ProducerBrokerExchange producerExchange,
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 Map<ActiveMQDestination,Destination> destinations
protected final DestinationMap destinationMap
protected final Map<ConsumerId,Subscription> subscriptions
protected final SystemUsage usageManager
protected final DestinationFactory destinationFactory
protected final DestinationStatistics destinationStatistics
protected final RegionBroker broker
protected boolean autoCreateDestinations
protected final TaskRunnerFactory taskRunnerFactory
protected final ReentrantReadWriteLock destinationsLock
protected final Map<ConsumerId,Object> consumerChangeMutexMap
protected boolean started
| Constructor Detail |
|---|
public AbstractRegion(RegionBroker broker,
DestinationStatistics destinationStatistics,
SystemUsage memoryManager,
TaskRunnerFactory taskRunnerFactory,
DestinationFactory destinationFactory)
| Method Detail |
|---|
public final void start()
throws Exception
start in interface ServiceException
public void stop()
throws Exception
stop in interface ServiceException
public Destination addDestination(ConnectionContext context,
ActiveMQDestination destination,
boolean createIfTemporary)
throws Exception
Region
addDestination in interface Regiondestination - the destination to create.
Exception - TODOpublic Map<ConsumerId,Subscription> getSubscriptions()
protected List<Subscription> addSubscriptionsForDestination(ConnectionContext context,
Destination dest)
throws Exception
Exception
public void removeDestination(ConnectionContext context,
ActiveMQDestination destination,
long timeout)
throws Exception
Region
removeDestination in interface Regioncontext - 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
Exception - TODOpublic Set<Destination> getDestinations(ActiveMQDestination destination)
getDestinations in interface Regionpublic Map<ActiveMQDestination,Destination> getDestinationMap()
Region
getDestinationMap in interface Region
public Subscription addConsumer(ConnectionContext context,
ConsumerInfo info)
throws Exception
Region
addConsumer in interface Regioncontext - the environment the operation is being executed under.
Exception - TODOpublic Set getDurableDestinations()
protected Set<ActiveMQDestination> getInactiveDestinations()
public void removeConsumer(ConnectionContext context,
ConsumerInfo info)
throws Exception
Region
removeConsumer in interface Regioncontext - the environment the operation is being executed under.
Exception - TODOprotected void destroySubscription(Subscription sub)
public void removeSubscription(ConnectionContext context,
RemoveSubscriptionInfo info)
throws Exception
Region
removeSubscription in interface Regioncontext - the environment the operation is being executed under.info - TODO
Exception - TODO
public void send(ProducerBrokerExchange producerExchange,
Message messageSend)
throws Exception
Region
send in interface RegionproducerExchange - the environment the operation is being executed under.
Exception - TODO
public void acknowledge(ConsumerBrokerExchange consumerExchange,
MessageAck ack)
throws Exception
Region
acknowledge in interface RegionconsumerExchange - the environment the operation is being executed under.
Exception - TODO
public Response messagePull(ConnectionContext context,
MessagePull pull)
throws Exception
Region
messagePull in interface RegionException
protected Destination lookup(ConnectionContext context,
ActiveMQDestination destination,
boolean createTemporary)
throws Exception
Exception
public void processDispatchNotification(MessageDispatchNotification messageDispatchNotification)
throws Exception
Region
processDispatchNotification in interface RegionException - TODO
protected void processDispatchNotificationViaDestination(MessageDispatchNotification messageDispatchNotification)
throws Exception
Exceptionpublic void gc()
gc in interface Region
protected abstract Subscription createSubscription(ConnectionContext context,
ConsumerInfo info)
throws Exception
Exception
protected Destination createDestination(ConnectionContext context,
ActiveMQDestination destination)
throws Exception
Exceptionpublic boolean isAutoCreateDestinations()
public void setAutoCreateDestinations(boolean autoCreateDestinations)
public void addProducer(ConnectionContext context,
ProducerInfo info)
throws Exception
Region
addProducer in interface Regioncontext - the environment the operation is being executed under.
Exception - TODO
public void removeProducer(ConnectionContext context,
ProducerInfo info)
throws Exception
removeProducer in interface Regioncontext - the environment the operation is being executed under.
Exception - TODO
protected void dispose(ConnectionContext context,
Destination dest)
throws Exception
Exception
public void processConsumerControl(ConsumerBrokerExchange consumerExchange,
ConsumerControl control)
processConsumerControl in interface Region
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||