コード例 #1
0
 public BufferConsumer(
     MemorySegment memorySegment,
     IBufferRecycler recycler,
     BufferBuilder.PositionMarker currentWriterPosition) : this(
         new NetworkBuffer(Preconditions.CheckNotNull(memorySegment), Preconditions.CheckNotNull(recycler), true),
         currentWriterPosition,
         0)
 {
 }
コード例 #2
0
 private BufferConsumer(
     IBuffer buffer,
     BufferBuilder.PositionMarker currentWriterPosition,
     int currentReaderPosition)
 {
     _buffer               = Preconditions.CheckNotNull(buffer);
     _writerPosition       = new CachedPositionMarker(Preconditions.CheckNotNull(currentWriterPosition));
     CurrentReaderPosition = currentReaderPosition;
 }
コード例 #3
0
 public CachedPositionMarker(BufferBuilder.PositionMarker positionMarker) => PositionMarker = positionMarker;