comparison src/org/eclipse/jetty/io/nio/SelectChannelEndPoint.java @ 914:54308d65265a

simplify SelectorManager
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 09 Oct 2016 01:22:55 -0600
parents 6b210bb66c63
children 65e0fba5861a
comparison
equal deleted inserted replaced
913:17f4fe8271de 914:54308d65265a
131 } 131 }
132 132
133 /* ------------------------------------------------------------ */ 133 /* ------------------------------------------------------------ */
134 public void setConnection(Connection connection) 134 public void setConnection(Connection connection)
135 { 135 {
136 Connection old=_connection;
137 _connection=(AsyncConnection)connection; 136 _connection=(AsyncConnection)connection;
138 if (old!=null && old!=_connection)
139 _manager.endPointUpgraded(this,old);
140 } 137 }
141 138
142 /* ------------------------------------------------------------ */ 139 /* ------------------------------------------------------------ */
143 public long getIdleTimestamp() 140 public long getIdleTimestamp()
144 { 141 {
195 _key.interestOps(0); 192 _key.interestOps(0);
196 else 193 else
197 { 194 {
198 // other wise do the dispatch 195 // other wise do the dispatch
199 dispatch(); 196 dispatch();
200 if (_state>=STATE_DISPATCHED && !_selectSet.getManager().isDeferringInterestedOps0())
201 {
202 _key.interestOps(0);
203 }
204 } 197 }
205 } 198 }
206 } 199 }
207 200
208 /* ------------------------------------------------------------ */ 201 /* ------------------------------------------------------------ */
696 { 689 {
697 final AsyncConnection next = (AsyncConnection)_connection.handle(); 690 final AsyncConnection next = (AsyncConnection)_connection.handle();
698 if (next!=_connection) 691 if (next!=_connection)
699 { 692 {
700 LOG.debug("{} replaced {}",next,_connection); 693 LOG.debug("{} replaced {}",next,_connection);
701 Connection old=_connection;
702 _connection=next; 694 _connection=next;
703 _manager.endPointUpgraded(this,old);
704 continue; 695 continue;
705 } 696 }
706 break; 697 break;
707 } 698 }
708 } 699 }