Class ReferenceCountUpdater<T extends ReferenceCounted>

    • Constructor Detail

      • ReferenceCountUpdater

        protected ReferenceCountUpdater()
    • Method Detail

      • unsafeOffset

        protected abstract long unsafeOffset()
      • initialValue

        public final int initialValue()
      • refCnt

        public final int refCnt​(T instance)
      • isLiveNonVolatile

        public final boolean isLiveNonVolatile​(T instance)
      • setRefCnt

        public final void setRefCnt​(T instance,
                                    int refCnt)
        An unsafe operation that sets the reference count directly
      • resetRefCnt

        public final void resetRefCnt​(T instance)
        Resets the reference count to 1
      • retain

        public final T retain​(T instance)
      • retain

        public final T retain​(T instance,
                              int increment)
      • release

        public final boolean release​(T instance)
      • release

        public final boolean release​(T instance,
                                     int decrement)