netty5/common/src/main
Nick Hill b26a61acd1 Centralize internal reference counting logic (#8614)
Motivation

AbstractReferenceCounted and AbstractReferenceCountedByteBuf contain
duplicate logic for managing the volatile refcount in an optimized and
consistent manner, which increased in complexity in #8583. It's possible
to extract this into a common helper class now that all access is via an
AtomicIntegerFieldUpdater.

Modifications

- Move duplicate logic into a shared ReferenceCountUpdater class
- Incorporate some additional simplification for the most common single
increment/decrement cases (fewer checks/operations)

Result

Less code duplication, better encapsulation of the "non-trivial"
internal volatile refcount manipulation
2019-04-09 16:22:32 +02:00
..
java/io/netty/util Centralize internal reference counting logic (#8614) 2019-04-09 16:22:32 +02:00
script Make IntObjectHashMap extend Map 2015-07-22 15:52:27 -07:00
templates/io/netty/util/collection Support removal using values iterator. (#8866) 2019-02-26 21:02:56 +01:00