Package 

Interface DataStoreHandler

    • Method Detail

      • setValue

         abstract <T extends Any> Unit setValue(String key, T data, Integer version, DataStoreWriteCallback callback, Serializer<T> serializer)

        Write data to the datastore. This executes on a worker thread and not on the caller thread.

        Parameters:
        key - name of the datastore entry.
        data - to write.
        version - optional version for the entry.
        callback - (optional) to indicate whether the operation succeeded or not.
        serializer - to use to serialize the data.
      • value

         abstract <T extends Any> Unit value(String key, Integer version, DataStoreReadCallback<T> callback, Deserializer<String, T> deserializer)

        Read data from the datastore. This executes on a worker thread and not on the caller thread.

        Parameters:
        key - name of the datastore entry.
        version - optional version to use when reading from the datastore.
        callback - to return result asynchronously.
        deserializer - to use to deserialize the data.
      • removeValue

         abstract Unit removeValue(String key, DataStoreWriteCallback callback)

        Remove an entry from the datastore. This executes on a worker thread and not on the caller thread.

        Parameters:
        key - name of the datastore entry
        callback - (optional) to indicate whether the operation succeeded or not.
      • clearAllData

         abstract Unit clearAllData()

        Removes all saved datastore entries.