Esempio n. 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;
 }
Esempio n. 2
0
 public GenericDispatcher(
     String name,
     DatabusSourcesConnection.StaticConfig connConfig,
     List<DatabusSubscription> subsList,
     CheckpointPersistenceProvider checkpointPersistor,
     DbusEventBuffer dataEventsBuffer,
     MultiConsumerCallback asyncCallback,
     Logger log) {
   this(
       name,
       connConfig,
       subsList,
       checkpointPersistor,
       dataEventsBuffer,
       asyncCallback,
       null,
       null,
       null,
       connConfig.getDispatcherRetries(),
       log);
 }