Class AbstractPooledDerivedByteBuf.PooledNonRetainedDuplicateByteBuf
- java.lang.Object
-
- io.netty.buffer.ByteBuf
-
- io.netty.buffer.AbstractByteBuf
-
- io.netty.buffer.AbstractDerivedByteBuf
-
- io.netty.buffer.DuplicatedByteBuf
-
- io.netty.buffer.UnpooledDuplicatedByteBuf
-
- io.netty.buffer.AbstractPooledDerivedByteBuf.PooledNonRetainedDuplicateByteBuf
-
- All Implemented Interfaces:
ReferenceCounted,java.lang.Comparable<ByteBuf>
- Enclosing class:
- AbstractPooledDerivedByteBuf
private static final class AbstractPooledDerivedByteBuf.PooledNonRetainedDuplicateByteBuf extends UnpooledDuplicatedByteBuf
-
-
Field Summary
Fields Modifier and Type Field Description private ReferenceCountedreferenceCountDelegate-
Fields inherited from class io.netty.buffer.AbstractByteBuf
checkAccessible, leakDetector, readerIndex, writerIndex
-
-
Constructor Summary
Constructors Constructor Description PooledNonRetainedDuplicateByteBuf(ReferenceCounted referenceCountDelegate, AbstractByteBuf buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufduplicate()Returns a buffer which shares the whole region of this buffer.(package private) intrefCnt0()(package private) booleanrelease0()(package private) booleanrelease0(int decrement)(package private) ByteBufretain0()(package private) ByteBufretain0(int increment)ByteBufretainedDuplicate()Returns a retained buffer which shares the whole region of this buffer.ByteBufretainedSlice()Returns a retained slice of this buffer's readable bytes.ByteBufretainedSlice(int index, int length)Returns a retained slice of this buffer's sub-region.ByteBufslice(int index, int length)Returns a slice of this buffer's sub-region.(package private) ByteBuftouch0()(package private) ByteBuftouch0(java.lang.Object hint)-
Methods inherited from class io.netty.buffer.UnpooledDuplicatedByteBuf
_getByte, _getInt, _getIntLE, _getLong, _getLongLE, _getShort, _getShortLE, _getUnsignedMedium, _getUnsignedMediumLE, _setByte, _setInt, _setIntLE, _setLong, _setLongLE, _setMedium, _setMediumLE, _setShort, _setShortLE, unwrap
-
Methods inherited from class io.netty.buffer.DuplicatedByteBuf
alloc, array, arrayOffset, capacity, capacity, copy, forEachByte, forEachByteDesc, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getInt, getIntLE, getLong, getLongLE, getShort, getShortLE, getUnsignedMedium, getUnsignedMediumLE, hasArray, hasMemoryAddress, isDirect, memoryAddress, nioBufferCount, nioBuffers, order, setByte, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setInt, setIntLE, setLong, setLongLE, setMedium, setMediumLE, setShort, setShortLE
-
Methods inherited from class io.netty.buffer.AbstractDerivedByteBuf
internalNioBuffer, isAccessible, isContiguous, isReadOnly, nioBuffer, refCnt, release, release, retain, retain, touch, touch
-
Methods inherited from class io.netty.buffer.AbstractByteBuf
adjustMarkers, asReadOnly, bytesBefore, bytesBefore, bytesBefore, checkDstIndex, checkDstIndex, checkIndex, checkIndex, checkIndex0, checkNewCapacity, checkReadableBytes, checkSrcIndex, clear, compareTo, copy, discardMarks, discardReadBytes, discardSomeReadBytes, ensureAccessible, ensureWritable, ensureWritable, ensureWritable0, equals, forEachByte, forEachByteAsc0, forEachByteDesc, forEachByteDesc0, getBoolean, getBytes, getBytes, getBytes, getChar, getCharSequence, getDouble, getFloat, getMedium, getMediumLE, getUnsignedByte, getUnsignedInt, getUnsignedIntLE, getUnsignedShort, getUnsignedShortLE, hashCode, indexOf, isReadable, isReadable, isWritable, isWritable, markReaderIndex, markWriterIndex, maxCapacity, maxCapacity, maxWritableBytes, newSwappedByteBuf, nioBuffer, nioBuffers, order, readableBytes, readBoolean, readByte, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readChar, readCharSequence, readDouble, readerIndex, readerIndex, readFloat, readInt, readIntLE, readLong, readLongLE, readMedium, readMediumLE, readRetainedSlice, readShort, readShortLE, readSlice, readUnsignedByte, readUnsignedInt, readUnsignedIntLE, readUnsignedMedium, readUnsignedMediumLE, readUnsignedShort, readUnsignedShortLE, resetReaderIndex, resetWriterIndex, setBoolean, setBytes, setBytes, setBytes, setChar, setCharSequence, setDouble, setFloat, setIndex, setIndex0, setZero, skipBytes, slice, toString, toString, toString, trimIndicesToCapacity, writableBytes, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeChar, writeCharSequence, writeDouble, writeFloat, writeInt, writeIntLE, writeLong, writeLongLE, writeMedium, writeMediumLE, writerIndex, writerIndex, writeShort, writeShortLE, writeZero
-
Methods inherited from class io.netty.buffer.ByteBuf
getDoubleLE, getFloatLE, maxFastWritableBytes, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLE
-
-
-
-
Field Detail
-
referenceCountDelegate
private final ReferenceCounted referenceCountDelegate
-
-
Constructor Detail
-
PooledNonRetainedDuplicateByteBuf
PooledNonRetainedDuplicateByteBuf(ReferenceCounted referenceCountDelegate, AbstractByteBuf buffer)
-
-
Method Detail
-
refCnt0
int refCnt0()
- Overrides:
refCnt0in classAbstractDerivedByteBuf
-
retain0
ByteBuf retain0()
- Overrides:
retain0in classAbstractDerivedByteBuf
-
retain0
ByteBuf retain0(int increment)
- Overrides:
retain0in classAbstractDerivedByteBuf
-
touch0
ByteBuf touch0()
- Overrides:
touch0in classAbstractDerivedByteBuf
-
touch0
ByteBuf touch0(java.lang.Object hint)
- Overrides:
touch0in classAbstractDerivedByteBuf
-
release0
boolean release0()
- Overrides:
release0in classAbstractDerivedByteBuf
-
release0
boolean release0(int decrement)
- Overrides:
release0in classAbstractDerivedByteBuf
-
duplicate
public ByteBuf duplicate()
Description copied from class:ByteBufReturns a buffer which shares the whole region of this buffer. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method does not modifyreaderIndexorwriterIndexof this buffer.The reader and writer marks will not be duplicated. Also be aware that this method will NOT call
ByteBuf.retain()and so the reference count will NOT be increased.- Overrides:
duplicatein classAbstractByteBuf- Returns:
- A buffer whose readable content is equivalent to the buffer returned by
ByteBuf.slice(). However this buffer will share the capacity of the underlying buffer, and therefore allows access to all of the underlying content if necessary.
-
retainedDuplicate
public ByteBuf retainedDuplicate()
Description copied from class:ByteBufReturns a retained buffer which shares the whole region of this buffer. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method is identical tobuf.slice(0, buf.capacity()). This method does not modifyreaderIndexorwriterIndexof this buffer.Note that this method returns a retained buffer unlike
ByteBuf.slice(int, int). This method behaves similarly toduplicate().retain()except that this method may return a buffer implementation that produces less garbage.- Overrides:
retainedDuplicatein classAbstractByteBuf
-
slice
public ByteBuf slice(int index, int length)
Description copied from class:ByteBufReturns a slice of this buffer's sub-region. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method does not modifyreaderIndexorwriterIndexof this buffer.Also be aware that this method will NOT call
ByteBuf.retain()and so the reference count will NOT be increased.- Overrides:
slicein classDuplicatedByteBuf
-
retainedSlice
public ByteBuf retainedSlice()
Description copied from class:ByteBufReturns a retained slice of this buffer's readable bytes. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method is identical tobuf.slice(buf.readerIndex(), buf.readableBytes()). This method does not modifyreaderIndexorwriterIndexof this buffer.Note that this method returns a retained buffer unlike
ByteBuf.slice(). This method behaves similarly toslice().retain()except that this method may return a buffer implementation that produces less garbage.- Overrides:
retainedSlicein classAbstractByteBuf
-
retainedSlice
public ByteBuf retainedSlice(int index, int length)
Description copied from class:ByteBufReturns a retained slice of this buffer's sub-region. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method does not modifyreaderIndexorwriterIndexof this buffer.Note that this method returns a retained buffer unlike
ByteBuf.slice(int, int). This method behaves similarly toslice(...).retain()except that this method may return a buffer implementation that produces less garbage.- Overrides:
retainedSlicein classAbstractByteBuf
-
-