private void updateTrafficMask(){
  int queueSize=trafficControllingSessions.size();
  while (queueSize > 0) {
    S session=trafficControllingSessions.poll();
    if (session == null) {
      return;
    }
    SessionState state=getState(session);
switch (state) {
case OPENED:
      updateTrafficControl(session);
    break;
case CLOSING:
  break;
case OPENING:
trafficControllingSessions.add(session);
break;
default :
throw new IllegalStateException(String.valueOf(state));
}
queueSize--;
}
}

private void updateTrafficMask ( ) { int queueSize = trafficControllingSessions . size ( ) ; while ( queueSize > 0 ) { S session = trafficControllingSessions . poll ( ) ; if ( session == null ) { return ; } SessionState state = getState ( session ) ; switch ( state ) { case OPENED : updateTrafficControl ( session ) ; break ; case CLOSING : break ; case OPENING : trafficControllingSessions . add ( session ) ; break ; default : throw new IllegalStateException ( String . valueOf ( state ) ) ; } queueSize -- ; } }
update the trafficcontrol for all the session .
