Interface KeyValueStore

  • All Implemented Interfaces:

    
    public interface KeyValueStore
    
                        

    Performs storage operations as key value pairs This interface defines the contract for persistent operations

    Note: The methods that include 'common' in their name persist the values across clients, the other methods only persist the values for the given client.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • putString

         abstract void putString(@NonNull() String key, @NonNull() String value)

        persist given String for the current client with given key

        Parameters:
        key - key associated with value
        value - string to persist
      • getString

        @Nullable() abstract String getString(@NonNull() String key)

        retrieves String for the current client with given key

        Parameters:
        key - key to retrieve value
        Returns:

        value associated with the key

      • putLong

         abstract void putLong(@NonNull() String key, long value)

        persist given long for the current client with given key

        Parameters:
        key - key associated with value
        value - long to persist
      • getLong

         abstract long getLong(@NonNull() String key)

        retrieves long for the current client with given key

        Parameters:
        key - key to retrieve value
        Returns:

        long associated with the key

      • putDouble

         abstract void putDouble(@NonNull() String key, double value)

        persist given double for the current client with given key

        Parameters:
        key - key associated with value
        value - string to persist
      • getDouble

         abstract double getDouble(@NonNull() String key)

        retrieves double for the current client with given key

        Parameters:
        key - key to retrieve value
        Returns:

        double associated with the key

      • putBoolean

         abstract void putBoolean(@NonNull() String key, boolean value)

        persist given boolean for the current client with given key

        Parameters:
        key - key associated with value
        value - string to persist
      • getBoolean

         abstract boolean getBoolean(@NonNull() String key)

        retrieves boolean for the current client with given key

        Parameters:
        key - key to retrieve value
        Returns:

        boolean associated with the key

      • putObject

         abstract <T> void putObject(@NonNull() String key, @NonNull() T value, @NonNull() Class<T> type)

        persist given object for the current client with given key

        Parameters:
        key - key associated with the value
        value - persisted object
        type - type of of object to be persisted
      • getObject

        @Nullable() abstract <T> T getObject(@NonNull() String key, Class<T> type)

        retrieves persisted object for the current client with given key

        Parameters:
        key - key to retrieve value
        type - type of persistent object to perform deserialization
        Returns:

        object associated with the key

      • putCommonString

         abstract void putCommonString(@NonNull() String key, @NonNull() String value)

        persist given String with given key within the Pointr instance

        Parameters:
        key - key associated with value
        value - string to persist
      • getCommonString

        @Nullable() abstract String getCommonString(@NonNull() String key)

        retrieves String with given key within the Pointr instance

        Parameters:
        key - key to retrieve value
        Returns:

        value associated with the key

      • putCommonLong

         abstract void putCommonLong(@NonNull() String key, long value)

        persist given long with given key within the Pointr instance

        Parameters:
        key - key associated with value
        value - long to persist
      • getCommonLong

         abstract long getCommonLong(@NonNull() String key)

        retrieves long with given key within the Pointr instance

        Parameters:
        key - key to retrieve value
        Returns:

        long associated with the key

      • putCommonDouble

         abstract void putCommonDouble(@NonNull() String key, double value)

        persist given double with given key within the Pointr instance

        Parameters:
        key - key associated with value
        value - string to persist
      • getCommonDouble

         abstract double getCommonDouble(@NonNull() String key)

        retrieves double with given key within the Pointr instance

        Parameters:
        key - key to retrieve value
        Returns:

        double associated with the key

      • putCommonBoolean

         abstract void putCommonBoolean(@NonNull() String key, boolean value)

        persist given boolean with given key within the Pointr instance

        Parameters:
        key - key associated with value
        value - string to persist
      • getCommonBoolean

         abstract boolean getCommonBoolean(@NonNull() String key)

        retrieves boolean with given key within the Pointr instance

        Parameters:
        key - key to retrieve value
        Returns:

        boolean associated with the key

      • putCommonObject

         abstract <T> void putCommonObject(@NonNull() String key, @NonNull() T value, @NonNull() Class<T> type)

        persist given object with given key within the Pointr instance

        Parameters:
        key - key associated with the value
        value - persisted object
        type - type of of object to be persisted
      • getCommonObject

        @Nullable() abstract <T> T getCommonObject(@NonNull() String key, Class<T> type)

        retrieves persisted object with given key within the Pointr instance

        Parameters:
        key - key to retrieve value
        type - type of persistent object to perform deserialization
        Returns:

        object associated with the key

      • deleteValue

         abstract void deleteValue(@NonNull() String key)

        Deletes value associated for the current client with given key

        Parameters:
        key - key to delete associated value