Mercurial Hosting > luan
comparison src/org/eclipse/jetty/io/nio/SelectorManager.java @ 957:d6b6d3e40161
remove SelectSet._endPoints
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Thu, 13 Oct 2016 18:29:36 -0600 |
parents | a021c4c9c244 |
children | fc521d2f098e |
comparison
equal
deleted
inserted
replaced
956:1094975d013b | 957:d6b6d3e40161 |
---|---|
192 { | 192 { |
193 private volatile long _now = System.currentTimeMillis(); | 193 private volatile long _now = System.currentTimeMillis(); |
194 | 194 |
195 private final SaneSelector _selector; | 195 private final SaneSelector _selector; |
196 | 196 |
197 private ConcurrentMap<SelectChannelEndPoint,Object> _endPoints = new ConcurrentHashMap<SelectChannelEndPoint, Object>(); | |
198 | |
199 SelectSet() throws IOException | 197 SelectSet() throws IOException |
200 { | 198 { |
201 _selector = new SaneSelector(); | 199 _selector = new SaneSelector(); |
202 } | 200 } |
203 | 201 |
292 private SelectChannelEndPoint createEndPoint(SocketChannel channel, SelectionKey sKey) throws IOException | 290 private SelectChannelEndPoint createEndPoint(SocketChannel channel, SelectionKey sKey) throws IOException |
293 { | 291 { |
294 SelectChannelEndPoint endp = new SelectChannelEndPoint(channel,this,sKey, _maxIdleTime); | 292 SelectChannelEndPoint endp = new SelectChannelEndPoint(channel,this,sKey, _maxIdleTime); |
295 endp.setConnection(getManager().newConnection(channel,endp, sKey.attachment())); | 293 endp.setConnection(getManager().newConnection(channel,endp, sKey.attachment())); |
296 LOG.debug("created {}",endp); | 294 LOG.debug("created {}",endp); |
297 _endPoints.put(endp,this); | |
298 return endp; | 295 return endp; |
299 } | 296 } |
300 | 297 |
301 public void destroyEndPoint(SelectChannelEndPoint endp) | 298 public void destroyEndPoint(SelectChannelEndPoint endp) |
302 { | 299 { |
303 LOG.debug("destroyEndPoint {}",endp); | 300 LOG.debug("destroyEndPoint {}",endp); |
304 _endPoints.remove(endp); | |
305 endp.getConnection().onClose(); | 301 endp.getConnection().onClose(); |
306 } | 302 } |
307 | 303 |
308 SaneSelector getSelector() | 304 SaneSelector getSelector() |
309 { | 305 { |