Package io.netty.util

Class Recycler.DefaultHandle<T>

    • Field Detail

      • LAST_RECYCLED_ID_UPDATER

        private static final java.util.concurrent.atomic.AtomicIntegerFieldUpdater<Recycler.DefaultHandle<?>> LAST_RECYCLED_ID_UPDATER
      • lastRecycledId

        volatile int lastRecycledId
      • recycleId

        int recycleId
      • hasBeenRecycled

        boolean hasBeenRecycled
      • value

        java.lang.Object value
    • Method Detail

      • recycle

        public void recycle​(java.lang.Object object)
        Description copied from interface: ObjectPool.Handle
        Recycle the Object if possible and so make it ready to be reused.
        Specified by:
        recycle in interface ObjectPool.Handle<T>
      • compareAndSetLastRecycledId

        public boolean compareAndSetLastRecycledId​(int expectLastRecycledId,
                                                   int updateLastRecycledId)