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

Create update function for counters

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 5.2.5
    • None
    • None

      Some use cases may be complex and easier to implement using an "update function" than the traditional "compare-and-set loop" (like implementing limits to counter's value).

      I'm proposing the following: update(CounterFunction<T> updateFunction).

      The function is able to read and modify the counter's value and it is allowed to return a custom object.

      Both the function and the return value must implement Streamable.

              pruivo@redhat.com Pedro Ruivo
              pruivo@redhat.com Pedro Ruivo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: