Class AbstractReferenceCountedByteBuf

    • Constructor Detail

      • AbstractReferenceCountedByteBuf

        protected AbstractReferenceCountedByteBuf​(int maxCapacity)
    • Method Detail

      • refCnt

        public int refCnt()
      • setRefCnt

        protected final void setRefCnt​(int refCnt)
        An unsafe operation intended for use by a subclass that sets the reference count of the buffer directly
      • resetRefCnt

        protected final void resetRefCnt()
        An unsafe operation intended for use by a subclass that resets the reference count of the buffer to 1
      • retain

        public ByteBuf retain()
        Specified by:
        retain in interface io.netty.util.ReferenceCounted
        Specified by:
        retain in class ByteBuf
      • retain

        public ByteBuf retain​(int increment)
        Specified by:
        retain in interface io.netty.util.ReferenceCounted
        Specified by:
        retain in class ByteBuf
      • touch

        public ByteBuf touch()
        Specified by:
        touch in interface io.netty.util.ReferenceCounted
        Specified by:
        touch in class ByteBuf
      • touch

        public ByteBuf touch​(Object hint)
        Specified by:
        touch in interface io.netty.util.ReferenceCounted
        Specified by:
        touch in class ByteBuf
      • release

        public boolean release()
      • release

        public boolean release​(int decrement)
      • deallocate

        protected abstract void deallocate()
        Called once refCnt() is equals 0.