Ejemplo n.º 1
0
        internal static PooledDuplicatedByteBuffer NewInstance(AbstractByteBuffer unwrapped, IByteBuffer wrapped, int readerIndex, int writerIndex)
        {
            PooledDuplicatedByteBuffer duplicate = Recycler.Take();

            _ = duplicate.Init <PooledDuplicatedByteBuffer>(unwrapped, wrapped, readerIndex, writerIndex, unwrapped.MaxCapacity);
            _ = duplicate.MarkReaderIndex();
            _ = duplicate.MarkWriterIndex();

            return(duplicate);
        }
Ejemplo n.º 2
0
 public sealed override IByteBuffer RetainedDuplicate() => PooledDuplicatedByteBuffer.NewInstance(this, this, this.ReaderIndex, this.WriterIndex);
Ejemplo n.º 3
0
 public override IByteBuffer RetainedDuplicate() => PooledDuplicatedByteBuffer.NewInstance(this.UnwrapCore(), this, this.Idx(this.ReaderIndex), this.Idx(this.WriterIndex));
Ejemplo n.º 4
0
 public override IByteBuffer RetainedDuplicate() => PooledDuplicatedByteBuffer.NewInstance(UnwrapCore(), this, ReaderIndex, WriterIndex);
Ejemplo n.º 5
0
 public sealed override IByteBuffer RetainedDuplicate() => PooledDuplicatedByteBuffer.NewInstance(UnwrapCore(), this, Idx(ReaderIndex), Idx(WriterIndex));