コード例 #1
0
 boolean hasCheckpointThresholdBeenExceeded() {
   // account for cases where control events are sent ; without windows being removed
   long maxWindowSizeInBytes =
       (long)
           (_dataEventsBuffer.getAllocatedSize()
               * (_connConfig.getCheckpointThresholdPct())
               / 100.00);
   boolean exceeded = getCurrentWindowSizeInBytes() > maxWindowSizeInBytes;
   if (_log.isDebugEnabled()) {
     _log.debug(
         "Threshold check : CurrentWindowSize="
             + getCurrentWindowSizeInBytes()
             + " MaxWindowSize="
             + maxWindowSizeInBytes
             + " bufferFreeSpace="
             + _dataEventsBuffer.getBufferFreeSpace());
   }
   if (exceeded) {
     _log.info(
         "The checkpoint threshold has exceeded. The CurrentWindowSize="
             + getCurrentWindowSizeInBytes()
             + " MaxWindowSize="
             + maxWindowSizeInBytes
             + " bufferFreeSpace="
             + _dataEventsBuffer.getBufferFreeSpace());
   }
   return exceeded;
 }