docs: public int size()
      {
          final AtomicBuffer buffer = this.buffer;
          final int headPositionIndex = this.headPositionIndex;
          final int tailPositionIndex = this.tailPositionIndex;
          long headBefore;
          long tail;
          long headAfter = buffer.getLongVolatile(headPositionIndex);
  
          do
          {
              headBefore = headAfter;
              tail = buffer.getLongVolatile(tailPositionIndex);
              headAfter = buffer.getLongVolatile(headPositionIndex);
          }
          while (headAfter != headBefore);
  
          return (int)(tail - headAfter);
      }