code: public boolean checkAndSwitchProcessingState(int ps0, int ps) {
      long rt = refreshTimeAndState;
      long _expect = withState(rt, ps0);
      long _update = withState(rt, ps);
      return STATE_UPDATER.compareAndSet(this, _expect, _update);
    }
docs: Check and switch the processing state atomically.