docs: @Override
      @SuppressWarnings("unchecked")
      public E poll() {
          Supplier<E> pollElement = () -> {
              if (size == 0) {
                  return null;
              }
              E result = (E) ringBuffer[headIndex];
              ringBuffer[headIndex] = null;
              if (size != 1) {
                  headIndex = nextIndex(headIndex);
              }
              size--;
              modificationsCount++;
              return result;
          };
          return writeConcurrently(pollElement);
      }