code: public void pause(ServerActivityCallback requestCountListener) {
          if (paused) {
              throw ServerLogger.ROOT_LOGGER.serverAlreadyPaused();
          }
          this.paused = true;
          listenerUpdater.set(this, requestCountListener);
          if (activeRequestCountUpdater.get(this) == 0) {
              if (listenerUpdater.compareAndSet(this, requestCountListener, null)) {
                  requestCountListener.done();
              }
          }
      }
docs: Pause the current entry point, and invoke the provided listener when all current requests have finished.
  
  If individual control point tracking is not enabled then the listener will be invoked straight away
  
  @param requestCountListener The listener to invoke