Class RefcountImpl<T>


  • public class RefcountImpl<T>
    extends java.lang.Object
    Ref-counted implementation; can be used by message implementations.
    Note that this class is experimental and may get removed without notice. The point of it is to get experience with ref counted messages and see if they're needed or not.
    See https://issues.redhat.com/browse/JGRP-2417 for details
    Since:
    5.1.0
    • Field Detail

      • refcount

        protected byte refcount
      • release_code

        protected java.util.function.Consumer<T> release_code
    • Constructor Detail

      • RefcountImpl

        public RefcountImpl()
      • RefcountImpl

        public RefcountImpl​(java.util.function.Consumer<T> c)
    • Method Detail

      • getRefcount

        public byte getRefcount()
      • onRelease

        public RefcountImpl<T> onRelease​(java.util.function.Consumer<T> rc)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • release

        protected void release​(T t)