public static boolean permitCurrentLog(long maxCount,long logCount,long currentLogTime,long prevLogTime){
  if (maxCount == 0) {
    return true;
  }
 else   if (currentLogTime == prevLogTime) {
    return true;
  }
  return logCount <= maxCount;
}

public static boolean permitCurrentLog ( long maxCount , long logCount , long currentLogTime , long prevLogTime ) { if ( maxCount == 0 ) { return true ; } else if ( currentLogTime == prevLogTime ) { return true ; } return logCount <= maxCount ; }
test if current log count is fewer than max count limit however , if the current log has the same timestamp with the previous log , we shouldn ' t stop even if max count limit has been exceeded . the upper layer component will decide if the last batch of logs should be discarded as a whole . this method is used by classes that read one log each time , e . g . logfilestream , logstreammerger
