Interface VersionedPersistentStore<V>

Type Parameters:
V -
All Superinterfaces:
AutoCloseable, Store<V>
All Known Implementing Classes:
UndefinedVersionDelegatingStore, VersionedDelegatingStore, ZookeeperPersistentStore

public interface VersionedPersistentStore<V> extends Store<V>
Extension to the Store interface that supports versions
  • Method Details

    • contains

      boolean contains(String key, DataChangeVersion version)
      Checks if lookup key is present in store. Sets data change version number.
      Parameters:
      key - lookup key
      version - version holder
      Returns:
      true if store contains lookup key, false otherwise
    • get

      V get(String key, DataChangeVersion version)
      Returns the value for the given key if exists, null otherwise. Sets data change version number.
      Parameters:
      key - lookup key
      version - version holder
    • put

      void put(String key, V value, DataChangeVersion version)
      Stores the (key, value) tuple in the store. If tuple already exits, stores it only if versions match, otherwise throws VersionMismatchException Lifetime of the tuple depends upon store mode.
      Parameters:
      key - lookup key
      value - value to store
      version - version holder