docs: @Override
      protected void wakeUp(long startDaemonTime, long startWakeUpTime) {
          try {
              BatchUpdateList currentUpdates[];
              synchronized (this) {
                  int sz = updates.size();
                  if (sz > 0) {
                      currentUpdates = new BatchUpdateList[sz];
                      updates.values().toArray(currentUpdates);
                      updates.clear();
                  } else {
                      // no events to process, out of here.
                      return;
                  }
              }
              ArrayList pushCacheEntryList = new ArrayList();
              for (int i = 0; i < currentUpdates.length; i++) {
                  BatchUpdateList bul = null;
                  try {
                      bul = currentUpdates[i];
                      // need to save all pushed CEs in an unfiltered
                      // list so we can dec the refCount after they
                      // have been pushed.
                      pushCacheEntryList.addAll(bul.pushCacheEntryEvents);
                      cleanUpEventLists(bul.cache, bul.invalidateByIdEvents,
                                        bul.invalidateByTemplateEvents,
                                        bul.pushCacheEntryEvents, bul.pushECFEvents,
                                        bul.aliasEntryEvents); // 245015
  
                      if (bul.invalidateByIdEvents.size() > 0) {
                          invalidationAuditDaemon.registerInvalidations(bul.cache.getCacheName(), bul.invalidateByIdEvents.values().iterator());
                      }
  
                      if (bul.invalidateByTemplateEvents.size() > 0)
                          invalidationAuditDaemon.registerInvalidations(bul.cache.getCacheName(), bul.invalidateByTemplateEvents.values().iterator());
  
                      if (bul.pushCacheEntryEvents.size() > 0)
                          bul.pushCacheEntryEvents = invalidationAuditDaemon.filterEntryList(bul.cache.getCacheName(), bul.pushCacheEntryEvents);
  
                      if (bul.pushECFEvents.size() > 0)
                          bul.pushECFEvents = invalidationAuditDaemon.filterExternalCacheFragmentList(bul.cache.getCacheName(), bul.pushECFEvents);
  
                      if ((bul.invalidateByIdEvents.size() > 0)
                          || (bul.invalidateByTemplateEvents.size() > 0)
                          || (bul.pushCacheEntryEvents.size() > 0)) {
  
                          RemoteServices remoteServices = bul.cache
                                          .getRemoteServices();
  
                          // if DRS is ready but congested add the content to a
                          // buffer which will be pushed in the next cycle
                          if (remoteServices.isDRSReady()
                              && remoteServices.isDRSCongested()) {
  
                              synchronized (drsBuffer) {
  
                                  addToDRSBuffer(bul); // also removes from the drsbuffer
  
                                  BatchUpdateList bufferList = (BatchUpdateList) drsBuffer
                                                  .get(bul.cache);
  
                                  if (null != bufferList) {
  
                                      // remove push entries added to buffer from
                                      // the pushCacheEntryEvents list since we do
                                      // not want finish()to be called on those
                                      // entries
                                      Iterator it = bufferList.pushCacheEntryEvents
                                                      .iterator();
  
                                      while (it.hasNext()) {
                                          CacheEntry ce = (CacheEntry) it.next();
                                          int index = pushCacheEntryList
                                                          .indexOf(ce);
                                          if (index >= 0)
                                              pushCacheEntryList.remove(index);
                                      }
                                  }
                              }
                          } else if (remoteServices.isDRSReady()
                                     && !remoteServices.isDRSCongested()) {
  
                              BatchUpdateList drsBufferList = (BatchUpdateList) drsBuffer
                                              .get(bul.cache);
                              // if DRS is not congested, then try to push the
                              // content in the drsBuffer along with
                              // the current content.
                              BatchUpdateList mergedList = null;
                              if (drsBufferList != null) {
                                  try {
  
                                      synchronized (drsBuffer) {
  
                                          mergedList = mergeLists(drsBufferList,
                                                                  bul);
                                          drsBuffer.remove(bul.cache);
                                      }
                                      cleanUpEventLists(
                                                        mergedList.cache,
                                                        mergedList.invalidateByIdEvents,
                                                        mergedList.invalidateByTemplateEvents,
                                                        mergedList.pushCacheEntryEvents,
                                                        mergedList.pushECFEvents,
                                                        mergedList.aliasEntryEvents);
                                      remoteServices
                                                      .batchUpdate(
                                                                   mergedList.invalidateByIdEvents,
                                                                   mergedList.invalidateByTemplateEvents,
                                                                   mergedList.pushCacheEntryEvents,
                                                                   mergedList.aliasEntryEvents);
                                  } finally {
                                      if (mergedList != null) {
                                          Iterator it = mergedList.pushCacheEntryEvents
                                                          .iterator();
                                          while (it.hasNext()) {
                                              ((CacheEntry) it.next()).finish();
                                          }
                                      }// if
  
                                  }// finally
                              } else
                                  remoteServices.batchUpdate(
                                                             bul.invalidateByIdEvents,
                                                             bul.invalidateByTemplateEvents,
                                                             bul.pushCacheEntryEvents,
                                                             bul.aliasEntryEvents);
                          }
                      }
  
                      // cache already has the fragments in its cache
                      // it just needs to be invalidated
                      // the cache will update the InvTemplateEvents with the
                      // cache ids each event removed
                      if ((bul.invalidateByIdEvents.size() > 0)
                          || (bul.invalidateByTemplateEvents.size() > 0)) {
                          bul.cache.batchUpdate(bul.invalidateByIdEvents,
                                                bul.invalidateByTemplateEvents,
                                                EMPTY_ARRAYLIST);
                      }
  
                      if ((bul.invalidateByIdEvents.size() > 0)
                          || (bul.invalidateByTemplateEvents.size() > 0)
                          || (bul.pushECFEvents.size() > 0)) {
  
                          if (externalCacheServices != null) {
                              if (bul.cache.getCacheConfig().isEnableServletSupport()
                                  || bul.cache.getCacheConfig().isEnableInterCellInvalidation()) {
                                  externalCacheServices.batchUpdate(
                                                                    bul.invalidateByIdEvents,
                                                                    bul.invalidateByTemplateEvents,
                                                                    bul.pushECFEvents);
                              }
                          }
                      }
                  } finally {
                      // ---------------------------------
                      // Dec the ref count
                      // ---------------------------------
                      Iterator pushCacheEntryIterator = pushCacheEntryList
                                      .iterator();
                      while (pushCacheEntryIterator.hasNext()) {
                          ((CacheEntry) pushCacheEntryIterator.next()).finish();
                      }
                      pushCacheEntryList.clear();
                      // ---------------------------------
                  } // try
              } // for
          } finally {
              // ---------------------------------
              // Refresh Cache Perf
              // Trim Cache
              // ---------------------------------
              Map caches = ServerCache.getCacheInstances();
              Iterator i = caches.values().iterator();
              while (i.hasNext()) {
                  DCache cache = (DCache) i.next();
                  cache.refreshCachePerf();
                  /*
                   * 398807 - Remove debug statement because these messages are
                   * printed out too often and fill up the trace log. You can get
                   * PushPullTable size using MBean Statistics if
                   * (tc.isDebugEnabled() && (System.currentTimeMillis() -
                   * this.lastTimeForTrace) > TRACE_WINDOW) { Tr.debug(tc,
                   * "cacheName=" + cache.cacheName + " CE Pool count=" +
                   * cache.cePoolCount + " PushPullTableSize=" +
                   * cache.getPushPullTableSize()); }
                   */
              }
              // ---------------------------------
          }
      }