Package io.ably.lib.push

Interface Storage


public interface Storage
Interface for an entity that supplies key value store
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clear(String[] keys)
    Removes keys from storage
    int
    get(String key, int defaultValue)
    Returns integer value based on key from storage
    get(String key, String defaultValue)
    Returns string value based on key from storage
    void
    put(String key, int value)
    Put integer value in to storage
    void
    put(String key, String value)
    Put string value in to storage
  • Method Details

    • put

      void put(String key, String value)
      Put string value in to storage
      Parameters:
      key - name under which value is stored
      value - stored string value
    • put

      void put(String key, int value)
      Put integer value in to storage
      Parameters:
      key - name after which value is stored
      value - stored integer value
    • get

      String get(String key, String defaultValue)
      Returns string value based on key from storage
      Parameters:
      key - name under value is stored
      defaultValue - value which is returned if key is not found
      Returns:
      value stored under key or default value if key is not found
    • get

      int get(String key, int defaultValue)
      Returns integer value based on key from storage
      Parameters:
      key - name under value is stored
      defaultValue - value which is returned if key is not found
      Returns:
      value stored under key or default value if key is not found
    • clear

      void clear(String[] keys)
      Removes keys from storage
      Parameters:
      keys - array of keys which values should be removed from storage