void markSegmentComplete(int segment){
  int remaining=segmentsRemaining.decrementAndGet();
  log.info("Segment " + segment + " complete. Remaining segments: "+ remaining);
  if (remaining == 0) {
    pageMux.setDraining(true);
    shutdown();
  }
}

void markSegmentComplete ( int segment ) { int remaining = segmentsRemaining . decrementAndGet ( ) ; log . info ( "Segment " + segment + " complete. Remaining segments: " + remaining ) ; if ( remaining == 0 ) { pageMux . setDraining ( true ) ; shutdown ( ) ; } }
called by read worker / read request once a segment has been fully read .
