private void checkIdle(Iterable<SelectionKey> keys){
  long now=U.currentTimeMillis();
  for (  SelectionKey key : keys) {
    GridSelectorNioSessionImpl ses=(GridSelectorNioSessionImpl)key.attachment();
    try {
      long writeTimeout0=writeTimeout;
      boolean opWrite=key.isValid() && (key.interestOps() & SelectionKey.OP_WRITE) != 0;
      if (opWrite && now - ses.lastSendTime() > writeTimeout0) {
        filterChain.onSessionWriteTimeout(ses);
        ses.bytesSent(0);
        continue;
      }
      long idleTimeout0=idleTimeout;
      if (!opWrite && now - ses.lastReceiveTime() > idleTimeout0 && now - ses.lastSendScheduleTime() > idleTimeout0) {
        filterChain.onSessionIdleTimeout(ses);
        ses.resetSendScheduleTime();
        ses.bytesReceived(0);
      }
    }
 catch (    IgniteCheckedException e) {
      close(ses,e);
    }
  }
}

private void checkIdle ( Iterable < SelectionKey > keys ) { long now = U . currentTimeMillis ( ) ; for ( SelectionKey key : keys ) { GridSelectorNioSessionImpl ses = ( GridSelectorNioSessionImpl ) key . attachment ( ) ; try { long writeTimeout0 = writeTimeout ; boolean opWrite = key . isValid ( ) && ( key . interestOps ( ) & SelectionKey . OP_WRITE ) != 0 ; if ( opWrite && now - ses . lastSendTime ( ) > writeTimeout0 ) { filterChain . onSessionWriteTimeout ( ses ) ; ses . bytesSent ( 0 ) ; continue ; } long idleTimeout0 = idleTimeout ; if ( ! opWrite && now - ses . lastReceiveTime ( ) > idleTimeout0 && now - ses . lastSendScheduleTime ( ) > idleTimeout0 ) { filterChain . onSessionIdleTimeout ( ses ) ; ses . resetSendScheduleTime ( ) ; ses . bytesReceived ( 0 ) ; } } catch ( IgniteCheckedException e ) { close ( ses , e ) ; } } }
checks sessions assigned to a selector for timeouts .
