changeset 956:1094975d013b

remove setCheckForIdle()
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 13 Oct 2016 18:11:01 -0600
parents 6f49b8dfffe6
children d6b6d3e40161
files src/org/eclipse/jetty/io/AsyncEndPoint.java src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java src/org/eclipse/jetty/io/nio/SslConnection.java src/org/eclipse/jetty/server/AbstractHttpConnection.java src/org/eclipse/jetty/server/AsyncHttpConnection.java src/org/eclipse/jetty/server/Connector.java src/org/eclipse/jetty/server/nio/SelectChannelConnector.java
diffstat 7 files changed, 0 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
diff -r 6f49b8dfffe6 -r 1094975d013b src/org/eclipse/jetty/io/AsyncEndPoint.java
--- a/src/org/eclipse/jetty/io/AsyncEndPoint.java	Thu Oct 13 16:55:53 2016 -0600
+++ b/src/org/eclipse/jetty/io/AsyncEndPoint.java	Thu Oct 13 18:11:01 2016 -0600
@@ -29,19 +29,6 @@
 	public void dispatch();
 	
 	/* ------------------------------------------------------------ */
-	/** Callback when idle.
-	 * <p>An endpoint is idle if there has been no IO activity for 
-	 * {@link #getMaxIdleTime()} and {@link #isCheckForIdle()} is true.
-	 * @param idleForMs TODO
-	 */
-//	public void onIdleExpired(long idleForMs);
-
-	/* ------------------------------------------------------------ */
-	/** Set if the endpoint should be checked for idleness
-	 */
-	public void setCheckForIdle(boolean check);
-
-	/* ------------------------------------------------------------ */
 	/**
 	 * @return True if IO has been successfully performed since the last call to {@link #hasProgressed()}
 	 */
diff -r 6f49b8dfffe6 -r 1094975d013b src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java
--- a/src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java	Thu Oct 13 16:55:53 2016 -0600
+++ b/src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java	Thu Oct 13 18:11:01 2016 -0600
@@ -80,8 +80,6 @@
 
 	/** true if {@link SelectSet#destroyEndPoint(SelectChannelEndPoint)} has not been called */
 	private boolean _open;
-
-	private volatile boolean _checkIdle;
 	
 	private boolean _ishut;
 
@@ -95,8 +93,6 @@
 		_state = STATE_UNDISPATCHED;
 		_open = true;
 		_key = key;
-
-		setCheckForIdle(true);
 	}
 
 	@Override
@@ -194,17 +190,6 @@
 	}
 
 	@Override
-	public void setCheckForIdle(boolean check)
-	{
-		if (check)
-		{
-			_checkIdle = true;
-		}
-		else
-			_checkIdle = false;
-	}
-
-	@Override
 	public int fill(Buffer buffer) throws IOException
 	{
 		int fill=super.fill(buffer);
@@ -270,8 +255,6 @@
 
 			long now = _selectSet.getNow();
 			long end = now+timeoutMs;
-			boolean check = _checkIdle;
-			setCheckForIdle(true);
 			try
 			{
 				_readBlocked = true;
@@ -298,7 +281,6 @@
 			finally
 			{
 				_readBlocked = false;
-				setCheckForIdle(check);
 			}
 		}
 		return true;
@@ -318,8 +300,6 @@
 
 			long now=_selectSet.getNow();
 			long end=now+timeoutMs;
-			boolean check = _checkIdle;
-			setCheckForIdle(true);
 			try
 			{
 				_writeBlocked = true;
@@ -345,7 +325,6 @@
 			finally
 			{
 				_writeBlocked = false;
-				setCheckForIdle(check);
 			}
 		}
 		return true;
diff -r 6f49b8dfffe6 -r 1094975d013b src/org/eclipse/jetty/io/nio/SslConnection.java
--- a/src/org/eclipse/jetty/io/nio/SslConnection.java	Thu Oct 13 16:55:53 2016 -0600
+++ b/src/org/eclipse/jetty/io/nio/SslConnection.java	Thu Oct 13 18:11:01 2016 -0600
@@ -733,11 +733,6 @@
 			_aEndp.dispatch();
 		}
 
-		public void setCheckForIdle(boolean check)
-		{
-			_aEndp.setCheckForIdle(check);
-		}
-
 		public boolean hasProgressed()
 		{
 			return _progressed.getAndSet(false);
diff -r 6f49b8dfffe6 -r 1094975d013b src/org/eclipse/jetty/server/AbstractHttpConnection.java
--- a/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Thu Oct 13 16:55:53 2016 -0600
+++ b/src/org/eclipse/jetty/server/AbstractHttpConnection.java	Thu Oct 13 18:11:01 2016 -0600
@@ -501,8 +501,6 @@
 					if (!_response.isCommitted() && !_request.isHandled())
 						_response.sendError(HttpServletResponse.SC_NOT_FOUND);
 					_response.complete();
-					if (_generator.isPersistent())
-						_connector.persist(_endp);
 				}
 			}
 			else
diff -r 6f49b8dfffe6 -r 1094975d013b src/org/eclipse/jetty/server/AsyncHttpConnection.java
--- a/src/org/eclipse/jetty/server/AsyncHttpConnection.java	Thu Oct 13 16:55:53 2016 -0600
+++ b/src/org/eclipse/jetty/server/AsyncHttpConnection.java	Thu Oct 13 18:11:01 2016 -0600
@@ -62,10 +62,6 @@
         {
             setCurrentConnection(this);
 
-            // don't check for idle while dispatched (unless blocking IO is done).
-            _asyncEndp.setCheckForIdle(false);
-
-
             // While progress and the connection has not changed
             while (progress && connection==this)
             {
@@ -150,9 +146,6 @@
             _parser.returnBuffers();
             _generator.returnBuffers();
 
-            // reenable idle checking unless request is suspended
-            _asyncEndp.setCheckForIdle(true);
-
             // Safety net to catch spinning
             if (some_progress)
                 _total_no_progress=0;
diff -r 6f49b8dfffe6 -r 1094975d013b src/org/eclipse/jetty/server/Connector.java
--- a/src/org/eclipse/jetty/server/Connector.java	Thu Oct 13 16:55:53 2016 -0600
+++ b/src/org/eclipse/jetty/server/Connector.java	Thu Oct 13 18:11:01 2016 -0600
@@ -189,10 +189,6 @@
 	{
 	}
 
-	public void persist(EndPoint endpoint) throws IOException
-	{
-	}
-
 	public boolean isConfidential(Request request)
 	{
 		return false;
diff -r 6f49b8dfffe6 -r 1094975d013b src/org/eclipse/jetty/server/nio/SelectChannelConnector.java
--- a/src/org/eclipse/jetty/server/nio/SelectChannelConnector.java	Thu Oct 13 16:55:53 2016 -0600
+++ b/src/org/eclipse/jetty/server/nio/SelectChannelConnector.java	Thu Oct 13 18:11:01 2016 -0600
@@ -89,14 +89,6 @@
 	}
 
 	@Override
-	public void persist(EndPoint endpoint) throws IOException
-	{
-		AsyncEndPoint aEndp = ((AsyncEndPoint)endpoint);
-		aEndp.setCheckForIdle(true);
-		super.persist(endpoint);
-	}
-
-	@Override
 	protected synchronized void doStart() throws Exception
 	{
 //		_manager.setMaxIdleTime(getMaxIdleTime());