Module iu.util
Package edu.iu

Interface IuDataStore

All Known Implementing Classes:
InMemorySessionStore

public interface IuDataStore
Backing data storage interface for use in implementing data management resources.
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    get(byte[] key)
    Get the binary value representation from Redis stored for the given key.
    Returns a listing of all entries in the data store (without contents).
    void
    put(byte[] key, byte[] data)
    Puts or deletes data represented by a given key.
    void
    put(byte[] key, byte[] value, Duration ttl)
    Write the given key/value pair to Redis and set the expiration time if defined.
  • Method Details

    • list

      Iterable<?> list()
      Returns a listing of all entries in the data store (without contents).
      Returns:
      data entry listing
    • get

      byte[] get(byte[] key)
      Get the binary value representation from Redis stored for the given key.
      Parameters:
      key - must not be null.
      Returns:
      null if key does not exist.
    • put

      void put(byte[] key, byte[] data)
      Puts or deletes data represented by a given key.
      Parameters:
      key - data key
      data - data to assign to the key, replaces existing data. May be null to delete existing data.
    • put

      void put(byte[] key, byte[] value, Duration ttl)
      Write the given key/value pair to Redis and set the expiration time if defined.
      Parameters:
      key - key for the cache entry. Must not be null.
      value - value stored for the key. Must not be null.
      ttl - optional expiration time. Can be null.