[jboss-cvs] JBoss Messaging SVN: r7716 - in trunk/src/main/org/jboss/messaging: core/remoting/impl/invm and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 12 09:33:15 EDT 2009
Author: timfox
Date: 2009-08-12 09:33:15 -0400 (Wed, 12 Aug 2009)
New Revision: 7716
Modified:
trunk/src/main/org/jboss/messaging/core/management/AcceptorControl.java
trunk/src/main/org/jboss/messaging/core/remoting/impl/invm/InVMAcceptor.java
trunk/src/main/org/jboss/messaging/core/remoting/spi/Acceptor.java
trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java
Log:
remove some more dead code
Modified: trunk/src/main/org/jboss/messaging/core/management/AcceptorControl.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/management/AcceptorControl.java 2009-08-12 13:32:32 UTC (rev 7715)
+++ trunk/src/main/org/jboss/messaging/core/management/AcceptorControl.java 2009-08-12 13:33:15 UTC (rev 7716)
@@ -32,10 +32,6 @@
*/
public interface AcceptorControl extends MessagingComponentControl
{
-// void pause() throws Exception;
-//
-// void resume() throws Exception;
-
String getName();
String getFactoryClassName();
Modified: trunk/src/main/org/jboss/messaging/core/remoting/impl/invm/InVMAcceptor.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/impl/invm/InVMAcceptor.java 2009-08-12 13:32:32 UTC (rev 7715)
+++ trunk/src/main/org/jboss/messaging/core/remoting/impl/invm/InVMAcceptor.java 2009-08-12 13:33:15 UTC (rev 7716)
@@ -55,9 +55,7 @@
private ConcurrentMap<String, Connection> connections = new ConcurrentHashMap<String, Connection>();
private volatile boolean started;
-
- private boolean paused;
-
+
private final ExecutorFactory executorFactory;
public InVMAcceptor(final Map<String, Object> configuration,
@@ -70,7 +68,7 @@
this.listener = listener;
this.id = ConfigurationHelper.getIntProperty(TransportConstants.SERVER_ID_PROP_NAME, 0, configuration);
-
+
this.executorFactory = new OrderedExecutorFactory(threadPool);
}
@@ -82,63 +80,26 @@
}
InVMRegistry.instance.registerAcceptor(id, this);
-
+
started = true;
-
- paused = false;
}
- /*
- * Stop accepting new connections
- */
- public synchronized void pause()
- {
- if (!started)
- {
- return;
- }
-
- if (paused)
- {
- return;
- }
-
- InVMRegistry.instance.unregisterAcceptor(id);
-
- paused = true;
- }
-
- public synchronized void resume()
- {
- if (!paused)
- {
- return;
- }
-
- InVMRegistry.instance.registerAcceptor(id, this);
-
- paused = false;
- }
-
public synchronized void stop()
{
if (!started)
{
return;
}
-
- if (!paused)
- {
- InVMRegistry.instance.unregisterAcceptor(id);
- }
+ InVMRegistry.instance.unregisterAcceptor(id);
+
for (Connection connection : connections.values())
{
listener.connectionDestroyed(connection.getID());
}
connections.clear();
-
+
started = false;
}
@@ -156,13 +117,15 @@
return handler;
}
-
+
public ExecutorFactory getExecutorFactory()
{
return this.executorFactory;
}
- public void connect(final String connectionID, final BufferHandler remoteHandler, final InVMConnector connector,
+ public void connect(final String connectionID,
+ final BufferHandler remoteHandler,
+ final InVMConnector connector,
final Executor clientExecutor)
{
if (!started)
@@ -210,14 +173,14 @@
public void connectionDestroyed(final Object connectionID)
{
if (connections.remove(connectionID) != null)
- {
+ {
listener.connectionDestroyed(connectionID);
-
- //Execute on different thread to avoid deadlocks
+
+ // Execute on different thread to avoid deadlocks
new Thread()
{
public void run()
- {
+ {
// Remove on the other side too
connector.disconnect((String)connectionID);
}
Modified: trunk/src/main/org/jboss/messaging/core/remoting/spi/Acceptor.java
===================================================================
--- trunk/src/main/org/jboss/messaging/core/remoting/spi/Acceptor.java 2009-08-12 13:32:32 UTC (rev 7715)
+++ trunk/src/main/org/jboss/messaging/core/remoting/spi/Acceptor.java 2009-08-12 13:33:15 UTC (rev 7716)
@@ -33,7 +33,4 @@
*/
public interface Acceptor extends MessagingComponent
{
- //void pause();
-
- //void resume();
}
Modified: trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java
===================================================================
--- trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java 2009-08-12 13:32:32 UTC (rev 7715)
+++ trunk/src/main/org/jboss/messaging/integration/transports/netty/NettyAcceptor.java 2009-08-12 13:33:15 UTC (rev 7716)
@@ -126,8 +126,6 @@
private ConcurrentMap<Object, Connection> connections = new ConcurrentHashMap<Object, Connection>();
- // private boolean paused;
-
private final Executor threadPool;
public NettyAcceptor(final Map<String, Object> configuration,
@@ -327,45 +325,6 @@
}
}
- // public synchronized void pause()
- // {
- // if (paused)
- // {
- // return;
- // }
- //
- // if (channelFactory == null)
- // {
- // return;
- // }
- //
- // //We *pause* the acceptor so no new connections are made
- //
- // serverChannelGroup.close().awaitUninterruptibly();
- //
- // try
- // {
- // Thread.sleep(500);
- // }
- // catch (Exception e)
- // {
- // }
- //
- // paused = true;
- // }
- //
- // public synchronized void resume()
- // {
- // if (!paused)
- // {
- // return;
- // }
- //
- // startServerChannels();
- //
- // paused = false;
- // }
-
public synchronized void stop()
{
if (channelFactory == null)
More information about the jboss-cvs-commits
mailing list