Class AbstractCASReferenceCounted

  • All Implemented Interfaces:
    io.netty.util.ReferenceCounted
    Direct Known Subclasses:
    EntryImpl

    public abstract class AbstractCASReferenceCounted
    extends java.lang.Object
    implements io.netty.util.ReferenceCounted
    Abstract base class for classes wants to implement ReferenceCounted.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract void deallocate()
      Called once refCnt() is equals 0.
      int refCnt()  
      boolean release()  
      boolean release​(int decrement)  
      io.netty.util.ReferenceCounted retain()  
      io.netty.util.ReferenceCounted retain​(int increment)  
      protected void setRefCnt​(int refCnt)
      An unsafe operation intended for use by a subclass that sets the reference count of the buffer directly
      io.netty.util.ReferenceCounted touch()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.netty.util.ReferenceCounted

        touch
    • Constructor Detail

      • AbstractCASReferenceCounted

        public AbstractCASReferenceCounted()
    • Method Detail

      • refCnt

        public final int refCnt()
        Specified by:
        refCnt in interface io.netty.util.ReferenceCounted
      • 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
      • retain

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

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

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

        public boolean release()
        Specified by:
        release in interface io.netty.util.ReferenceCounted
      • release

        public boolean release​(int decrement)
        Specified by:
        release in interface io.netty.util.ReferenceCounted
      • deallocate

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