Class Versioned<V>

java.lang.Object
org.mockserver.state.Versioned<V>
Type Parameters:
V - the value type

public final class Versioned<V> extends Object
A value paired with an optimistic-concurrency version number. The version is incremented on every mutation; KeyValueStore.compareAndSet(java.lang.String, long, V) uses it to detect concurrent updates.
  • Constructor Details

    • Versioned

      public Versioned(V value, long version)
  • Method Details

    • getValue

      public V getValue()
    • getVersion

      public long getVersion()
    • toString

      public String toString()
      Overrides:
      toString in class Object