Class COUNTER.VersionedValue

java.lang.Object
org.jgroups.protocols.COUNTER.VersionedValue
Enclosing class:
COUNTER

protected static class COUNTER.VersionedValue extends Object
  • Field Details

    • value

      protected long value
    • version

      protected long version
  • Constructor Details

    • VersionedValue

      protected VersionedValue(long value)
    • VersionedValue

      protected VersionedValue(long value, long version)
  • Method Details

    • addAndGet

      protected long[] addAndGet(long num)
    • set

      protected long[] set(long value)
    • compareAndSwap

      protected long[] compareAndSwap(long expected, long update)
    • updateIfBigger

      protected void updateIfBigger(long value, long version)
      Sets the value only if the version argument is greater than the own version
    • snapshot

      long[] snapshot()
    • update

      <T extends Streamable> COUNTER.UpdateResult<T> update(CounterFunction<T> updateFunction)
    • toString

      public String toString()
      Overrides:
      toString in class Object