diff src/org/eclipse/jetty/server/Connector.java @ 913:17f4fe8271de

simplify connectors
author Franklin Schmidt <fschmidt@gmail.com>
date Sat, 08 Oct 2016 23:57:11 -0600
parents c60c1adfac3e
children 54308d65265a
line wrap: on
line diff
--- a/src/org/eclipse/jetty/server/Connector.java	Sat Oct 08 22:05:14 2016 -0600
+++ b/src/org/eclipse/jetty/server/Connector.java	Sat Oct 08 23:57:11 2016 -0600
@@ -66,7 +66,6 @@
 	private int _acceptors = 1;
 
 	protected int _maxIdleTime = 200000;
-	protected int _lowResourceMaxIdleTime = -1;
 	protected int _soLingerTime = -1;
 
 	protected final HttpBuffersImpl _buffers = new HttpBuffersImpl();
@@ -120,52 +119,12 @@
 	 * @param maxIdleTime
 	 *            The maxIdleTime to set.
 	 */
+/*
 	public void setMaxIdleTime(int maxIdleTime)
 	{
 		_maxIdleTime = maxIdleTime;
 	}
-
-	/* ------------------------------------------------------------ */
-	/**
-	 * @return Returns the maxIdleTime when resources are low.
-	 */
-	public int getLowResourcesMaxIdleTime()
-	{
-		return _lowResourceMaxIdleTime;
-	}
-
-	/* ------------------------------------------------------------ */
-	/**
-	 * @param maxIdleTime
-	 *            The maxIdleTime to set when resources are low.
-	 */
-	public void setLowResourcesMaxIdleTime(int maxIdleTime)
-	{
-		_lowResourceMaxIdleTime = maxIdleTime;
-	}
-
-	/* ------------------------------------------------------------ */
-	/**
-	 * @return Returns the maxIdleTime when resources are low.
-	 * @deprecated
-	 */
-	@Deprecated
-	public final int getLowResourceMaxIdleTime()
-	{
-		return getLowResourcesMaxIdleTime();
-	}
-
-	/* ------------------------------------------------------------ */
-	/**
-	 * @param maxIdleTime
-	 *            The maxIdleTime to set when resources are low.
-	 * @deprecated
-	 */
-	@Deprecated
-	public final void setLowResourceMaxIdleTime(int maxIdleTime)
-	{
-		setLowResourcesMaxIdleTime(maxIdleTime);
-	}
+*/
 
 	/* ------------------------------------------------------------ */
 	/**
@@ -224,11 +183,13 @@
 
 	/* ------------------------------------------------------------ */
 	@Override
-	protected void doStop() throws Exception
+	protected synchronized void doStop() throws Exception
 	{
 		try
 		{
-			close();
+			if (_acceptChannel != null)
+				_acceptChannel.close();
+			_acceptChannel=null;
 		}
 		catch (IOException e)
 		{
@@ -425,9 +386,6 @@
 		return server.isLowOnThreads();
 	}
 
-	// from old interface
-	public abstract void close() throws IOException;
-
 
 	// from AbstractNIOConnector