code: public final boolean setScheduledForFlush(boolean flag) {
          if (flag) {
              // If the current tag is set to false, switch it to true
              return scheduledForFlush.compareAndSet(false, true);
          }
  
          scheduledForFlush.set(false);
          return true;
      }
docs: TODO Add method documentation