Interface Store<V>

Type Parameters:
V - value type
All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
PersistentStore<V>, VersionedPersistentStore<V>
All Known Implementing Classes:
BasePersistentStore, CaseInsensitivePersistentStore, HBasePersistentStore, InMemoryStore, LocalPersistentStore, MongoPersistentStore, NoWriteLocalStore, UndefinedVersionDelegatingStore, VersionedDelegatingStore, ZookeeperPersistentStore

public interface Store<V> extends AutoCloseable
A Store interface used to store and retrieve instances of given value type.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes the value corresponding to the given key if exists, nothing happens otherwise.
    Returns storage mode of this store.
    getRange(int skip, int take)
    Returns an iterator of desired number of entries offsetting by the skip value.
    boolean
    putIfAbsent(String key, V value)
    Stores the (key, value) tuple in the store only if it does not exists.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • getMode

      Returns storage mode of this store.
    • delete

      void delete(String key)
      Removes the value corresponding to the given key if exists, nothing happens otherwise.
      Parameters:
      key - lookup key
    • putIfAbsent

      boolean putIfAbsent(String key, V value)
      Stores the (key, value) tuple in the store only if it does not exists.
      Parameters:
      key - lookup key
      value - value to store
      Returns:
      true if put takes place, false otherwise.
    • getRange

      Iterator<Map.Entry<String,V>> getRange(int skip, int take)
      Returns an iterator of desired number of entries offsetting by the skip value.
      Parameters:
      skip - number of records to skip from beginning
      take - max number of records to return