mirror of https://github.com/apache/activemq.git
minor code cleanup - more final variables, generics, less unneeded initialization
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@729836 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e585aaec2f
commit
fd84b78d5b
|
@ -80,7 +80,7 @@ public class RegionBroker extends EmptyBroker {
|
||||||
private final Region topicRegion;
|
private final Region topicRegion;
|
||||||
private final Region tempQueueRegion;
|
private final Region tempQueueRegion;
|
||||||
private final Region tempTopicRegion;
|
private final Region tempTopicRegion;
|
||||||
protected BrokerService brokerService;
|
protected final BrokerService brokerService;
|
||||||
private boolean started;
|
private boolean started;
|
||||||
private boolean keepDurableSubsActive;
|
private boolean keepDurableSubsActive;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ public class RegionBroker extends EmptyBroker {
|
||||||
private final LongSequenceGenerator sequenceGenerator = new LongSequenceGenerator();
|
private final LongSequenceGenerator sequenceGenerator = new LongSequenceGenerator();
|
||||||
private BrokerId brokerId;
|
private BrokerId brokerId;
|
||||||
private String brokerName;
|
private String brokerName;
|
||||||
private Map<String, ConnectionContext> clientIdSet = new HashMap<String, ConnectionContext>();
|
private final Map<String, ConnectionContext> clientIdSet = new HashMap<String, ConnectionContext>();
|
||||||
private final DestinationInterceptor destinationInterceptor;
|
private final DestinationInterceptor destinationInterceptor;
|
||||||
private ConnectionContext adminConnectionContext;
|
private ConnectionContext adminConnectionContext;
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ public class RegionBroker extends EmptyBroker {
|
||||||
case ActiveMQDestination.TEMP_TOPIC_TYPE:
|
case ActiveMQDestination.TEMP_TOPIC_TYPE:
|
||||||
return tempTopicRegion.getDestinations(destination);
|
return tempTopicRegion.getDestinations(destination);
|
||||||
default:
|
default:
|
||||||
return Collections.EMPTY_SET;
|
return Collections.emptySet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,7 +415,7 @@ public class RegionBroker extends EmptyBroker {
|
||||||
ActiveMQDestination destination = message.getDestination();
|
ActiveMQDestination destination = message.getDestination();
|
||||||
// ensure the destination is registered with the RegionBroker
|
// ensure the destination is registered with the RegionBroker
|
||||||
producerExchange.getConnectionContext().getBroker().addDestination(producerExchange.getConnectionContext(), destination);
|
producerExchange.getConnectionContext().getBroker().addDestination(producerExchange.getConnectionContext(), destination);
|
||||||
Region region = null;
|
Region region;
|
||||||
switch (destination.getDestinationType()) {
|
switch (destination.getDestinationType()) {
|
||||||
case ActiveMQDestination.QUEUE_TYPE:
|
case ActiveMQDestination.QUEUE_TYPE:
|
||||||
region = queueRegion;
|
region = queueRegion;
|
||||||
|
@ -440,7 +440,7 @@ public class RegionBroker extends EmptyBroker {
|
||||||
public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
|
public void acknowledge(ConsumerBrokerExchange consumerExchange, MessageAck ack) throws Exception {
|
||||||
if (consumerExchange.isWildcard() || consumerExchange.getRegion() == null) {
|
if (consumerExchange.isWildcard() || consumerExchange.getRegion() == null) {
|
||||||
ActiveMQDestination destination = ack.getDestination();
|
ActiveMQDestination destination = ack.getDestination();
|
||||||
Region region = null;
|
Region region;
|
||||||
switch (destination.getDestinationType()) {
|
switch (destination.getDestinationType()) {
|
||||||
case ActiveMQDestination.QUEUE_TYPE:
|
case ActiveMQDestination.QUEUE_TYPE:
|
||||||
region = queueRegion;
|
region = queueRegion;
|
||||||
|
|
Loading…
Reference in New Issue