Class LoomPNCounter

java.lang.Object
com.loomcache.client.LoomPNCounter

public final class LoomPNCounter extends Object
Client-side session-bound PN-counter proxy.

The proxy binds a generated session id before the first operation. If the server reports the binding as stale, operations throw ConsistencyLostException; callers can invoke reset() to establish a fresh binding.

  • Method Details

    • get

      public long get()
    • incrementAndGet

      public long incrementAndGet()
    • decrementAndGet

      public long decrementAndGet()
    • addAndGet

      public long addAndGet(long delta)
    • subtractAndGet

      public long subtractAndGet(long delta)
    • reset

      public void reset()
      Rebind this proxy's session. This does not change the counter value.