Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-2942

Reference couting for messages

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Major Major
    • 5.5.1
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      Similar to JGRP-2417.
      Required by Infinispan which uses Netty's pooled buffers (ByteBuf). This needs to be given a callback to release a ByteBuf back to the pool. The callback should be invoked when JGroups is done with a message M, ie. when M is removed from the retransmission tables (e.g. in NAKACK2 or UNICAST3).

      Provide new (default: no-op) methods in Message:

      • incr(): increments the reference count
      • decr(): decrements the reference count
      • refCount(): gets the reference count

      Method incr() is called when a message is sent, decr() when (1) NAKACK or UNICAST release the message (removal from the retransmission table) and (2) when the send returns.

      When the reference count goes from 1 to 0, the resource associated with the message (e.g. a pooled bytebuf) can be released.

              rhn-engineering-bban Bela Ban
              rhn-engineering-bban Bela Ban
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: