[hornetq-commits] JBoss hornetq SVN: r12179 - trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/invm.

do-not-reply at jboss.org do-not-reply at jboss.org
Thu Feb 23 04:41:06 EST 2012


Author: borges
Date: 2012-02-23 04:41:02 -0500 (Thu, 23 Feb 2012)
New Revision: 12179

Modified:
   trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/invm/InVMAcceptor.java
   trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/invm/InVMRegistry.java
Log:
Remove unused fields, make classes final.

Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/invm/InVMAcceptor.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/invm/InVMAcceptor.java	2012-02-23 09:40:37 UTC (rev 12178)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/invm/InVMAcceptor.java	2012-02-23 09:41:02 UTC (rev 12179)
@@ -20,7 +20,6 @@
 import org.hornetq.api.core.HornetQException;
 import org.hornetq.api.core.SimpleString;
 import org.hornetq.api.core.management.NotificationType;
-import org.hornetq.core.logging.Logger;
 import org.hornetq.core.security.HornetQPrincipal;
 import org.hornetq.core.server.cluster.ClusterConnection;
 import org.hornetq.core.server.management.Notification;
@@ -37,18 +36,16 @@
 
 /**
  * A InVMAcceptor
- * 
+ *
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
  *
  */
-public class InVMAcceptor implements Acceptor
+public final class InVMAcceptor implements Acceptor
 {
-   private static final Logger log = Logger.getLogger(InVMAcceptor.class);
-
    private final int id;
 
    private final BufferHandler handler;
-   
+
    private final ConnectionLifeCycleListener listener;
 
    private final ConcurrentMap<String, Connection> connections = new ConcurrentHashMap<String, Connection>();
@@ -56,36 +53,36 @@
    private volatile boolean started;
 
    private final ExecutorFactory executorFactory;
-   
+
    private final ClusterConnection clusterConnection;
 
    private boolean paused;
 
    private NotificationService notificationService;
-   
+
    private final Map<String, Object> configuration;
 
    private HornetQPrincipal defaultHornetQPrincipal;
 
    public InVMAcceptor(final ClusterConnection clusterConnection,
                        final Map<String, Object> configuration,
-                       final BufferHandler handler,                       
+                       final BufferHandler handler,
                        final ConnectionLifeCycleListener listener,
                        final Executor threadPool)
    {
       this.clusterConnection = clusterConnection;
-      
+
       this.configuration = configuration;
-      
+
       this.handler = handler;
-      
+
       this.listener = listener;
 
       id = ConfigurationHelper.getIntProperty(TransportConstants.SERVER_ID_PROP_NAME, 0, configuration);
 
       executorFactory = new OrderedExecutorFactory(threadPool);
    }
-   
+
    public Map<String, Object> getConfiguration()
    {
       return configuration;
@@ -95,7 +92,7 @@
    {
       return clusterConnection;
    }
-   
+
    public synchronized void start() throws Exception
    {
       if (started)
@@ -248,7 +245,7 @@
    private class Listener implements ConnectionLifeCycleListener
    {
       //private static Listener instance = new Listener();
-      
+
       private final InVMConnector connector;
 
       Listener(final InVMConnector connector)
@@ -269,10 +266,10 @@
       public void connectionDestroyed(final Object connectionID)
       {
          InVMConnection connection = (InVMConnection)connections.remove(connectionID);
-         
+
          if (connection != null)
          {
- 
+
             listener.connectionDestroyed(connectionID);
 
               // Execute on different thread after all the packets are sent, to avoid deadlocks

Modified: trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/invm/InVMRegistry.java
===================================================================
--- trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/invm/InVMRegistry.java	2012-02-23 09:40:37 UTC (rev 12178)
+++ trunk/hornetq-core/src/main/java/org/hornetq/core/remoting/impl/invm/InVMRegistry.java	2012-02-23 09:41:02 UTC (rev 12179)
@@ -15,18 +15,14 @@
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
-import org.hornetq.core.logging.Logger;
-
 /**
  * A InVMRegistry
- * 
+ *
  * @author <a href="mailto:tim.fox at jboss.com">Tim Fox</a>
  *
  */
-public class InVMRegistry
+public final class InVMRegistry
 {
-   private static final Logger log = Logger.getLogger(InVMRegistry.class);
-
    public static final InVMRegistry instance = new InVMRegistry();
 
    private final ConcurrentMap<Integer, InVMAcceptor> acceptors = new ConcurrentHashMap<Integer, InVMAcceptor>();



More information about the hornetq-commits mailing list