@ApiStatus.Internal
  public void batchUpdate(Runnable runnable) {
    if (Boolean.TRUE.equals(isInBatchUpdate.get())) {
      runnable.run();
    } else {
      isInBatchUpdate.set(true);
      try {
        runnable.run();
      } finally {
        isInBatchUpdate.remove();
      }
      if (!batchItems.isEmpty()) {
        flushBatch();
      }
    }
  }
@ApiStatus.Internal
  public void batchUpdate(Runnable runnable)