Class SyncStrongCounterAdapter

java.lang.Object
org.infinispan.counter.impl.SyncStrongCounterAdapter
All Implemented Interfaces:
org.infinispan.counter.api.SyncStrongCounter

public class SyncStrongCounterAdapter extends Object implements org.infinispan.counter.api.SyncStrongCounter
A StrongCounter decorator that waits for the operation to complete.
Since:
9.2
Author:
Pedro Ruivo
See Also:
  • StrongCounter
  • Constructor Details

    • SyncStrongCounterAdapter

      public SyncStrongCounterAdapter(org.infinispan.counter.api.StrongCounter counter)
  • Method Details

    • addAndGet

      public long addAndGet(long delta)
      Specified by:
      addAndGet in interface org.infinispan.counter.api.SyncStrongCounter
      See Also:
      • StrongCounter.addAndGet(long)
    • reset

      public void reset()
      Specified by:
      reset in interface org.infinispan.counter.api.SyncStrongCounter
      See Also:
      • StrongCounter.reset()
    • getValue

      public long getValue()
      Specified by:
      getValue in interface org.infinispan.counter.api.SyncStrongCounter
      See Also:
      • StrongCounter.decrementAndGet()
    • compareAndSwap

      public long compareAndSwap(long expect, long update)
      Specified by:
      compareAndSwap in interface org.infinispan.counter.api.SyncStrongCounter
    • getName

      public String getName()
      Specified by:
      getName in interface org.infinispan.counter.api.SyncStrongCounter
      See Also:
      • StrongCounter.getName()
    • getConfiguration

      public org.infinispan.counter.api.CounterConfiguration getConfiguration()
      Specified by:
      getConfiguration in interface org.infinispan.counter.api.SyncStrongCounter
      See Also:
      • StrongCounter.getConfiguration()
    • remove

      public void remove()
      Specified by:
      remove in interface org.infinispan.counter.api.SyncStrongCounter
      See Also:
      • StrongCounter.remove()
    • getAndSet

      public long getAndSet(long value)
      Specified by:
      getAndSet in interface org.infinispan.counter.api.SyncStrongCounter
      See Also:
      • StrongCounter.getAndSet(long)
    • toString

      public String toString()
      Overrides:
      toString in class Object