Class AbstractCASReferenceCounted

java.lang.Object
org.apache.bookkeeper.mledger.util.AbstractCASReferenceCounted
All Implemented Interfaces:
io.netty.util.ReferenceCounted
Direct Known Subclasses:
EntryImpl

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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    Called once refCnt() is equals 0.
    final int
     
    boolean
     
    boolean
    release(int decrement)
     
    io.netty.util.ReferenceCounted
     
    io.netty.util.ReferenceCounted
    retain(int increment)
     
    protected final 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
     

    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 Details

    • AbstractCASReferenceCounted

      public AbstractCASReferenceCounted()
  • Method Details

    • 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.