Mercurial Hosting > luan
diff src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java @ 964:768414c16e10
remove SelectSet
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 14 Oct 2016 01:03:47 -0600 |
parents | 4b6216fa9cec |
children | 866f2e801618 |
line wrap: on
line diff
--- a/src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java Fri Oct 14 00:15:28 2016 -0600 +++ b/src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java Fri Oct 14 01:03:47 2016 -0600 @@ -32,7 +32,6 @@ import org.eclipse.jetty.io.ConnectedEndPoint; import org.eclipse.jetty.io.Connection; import org.eclipse.jetty.io.EofException; -import org.eclipse.jetty.io.nio.SelectorManager.SelectSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -45,7 +44,6 @@ { public static final Logger LOG=LoggerFactory.getLogger("org.eclipse.jetty.io.nio"); - private final SelectorManager.SelectSet _selectSet; private final SelectorManager _manager; private final SelectionKey _key; private final Runnable _handler = new Runnable() @@ -79,13 +77,12 @@ private boolean _ishut = false; - public SelectChannelEndPoint(SocketChannel channel, SelectSet selectSet, SelectionKey key, int maxIdleTime) + public SelectChannelEndPoint(SocketChannel channel, SelectorManager manager, SelectionKey key, int maxIdleTime) throws IOException { super(channel, maxIdleTime); - _manager = selectSet.getManager(); - _selectSet = selectSet; + _manager = manager; _key = key; } @@ -234,7 +231,7 @@ if (isInputShutdown()) throw new EofException(); - long now = _selectSet.getNow(); + long now = _manager.getNow(); long end = now+timeoutMs; try { @@ -252,7 +249,7 @@ } finally { - now = _selectSet.getNow(); + now = _manager.getNow(); } if (_readBlocked && timeoutMs>0 && now>=end) @@ -276,7 +273,7 @@ if (isOutputShutdown()) throw new EofException(); - long now=_selectSet.getNow(); + long now=_manager.getNow(); long end=now+timeoutMs; try { @@ -294,7 +291,7 @@ } finally { - now = _selectSet.getNow(); + now = _manager.getNow(); } if (_writeBlocked && timeoutMs>0 && now>=end) return false; @@ -333,7 +330,7 @@ | ((!_socket.isOutputShutdown()&& write_interest) ? SelectionKey.OP_WRITE : 0); if( _key.interestOps() != interestOps ) { _key.interestOps(interestOps); - _selectSet.getSelector().update(); + _manager.getSelector().update(); } } else { _key.cancel();