PrimitiveSimpleStore

interface PrimitiveSimpleStore : SimpleStore

Store primitives on disk.

All methods never return null in the ListenableFuture, #contains should be used for optionality. If the value is not set, the 0-byte primitive will be returned.

Functions

Link copied to clipboard
abstract fun clear(): ListenableFuture<Void>
Delete all keys in this direct namespace.
Link copied to clipboard
abstract fun close()
Fails all outstanding operations then releases the memory cache.
abstract fun close()
Link copied to clipboard
abstract fun contains(key: String): ListenableFuture<Boolean>
Determine if a key exists in storage.
Link copied to clipboard
@Beta
abstract fun deleteAllNow(): ListenableFuture<Void>
Recursively delete all keys in this scope and child scopes.
Link copied to clipboard
abstract fun get(key: String): ListenableFuture<Array<Byte>>
Retrieve a byte[] from disk.
Link copied to clipboard
abstract fun getBoolean(key: String): ListenableFuture<Boolean>
Link copied to clipboard
abstract fun getDouble(key: String): ListenableFuture<Double>
Link copied to clipboard
abstract fun getInt(key: String): ListenableFuture<Integer>
Link copied to clipboard
abstract fun getLong(key: String): ListenableFuture<Long>
Link copied to clipboard
abstract fun getString(key: String): ListenableFuture<String>
Retrieves a #UTF_16BE string.
Link copied to clipboard
abstract fun put(key: String, value: Boolean): ListenableFuture<Boolean>
abstract fun put(key: String, value: Double): ListenableFuture<Double>
abstract fun put(key: String, value: Int): ListenableFuture<Integer>
abstract fun put(key: String, value: Long): ListenableFuture<Long>

abstract fun put(key: String, value: String): ListenableFuture<String>
Store string as #UTF_16BE.
abstract fun put(key: String, @Nullable value: Array<Byte>): ListenableFuture<Array<Byte>>
Stores a byte[] on disk.
Link copied to clipboard
abstract fun putString(key: String, @Nullable value: String): ListenableFuture<String>
Stores a String as a byte[].
Link copied to clipboard
abstract fun remove(key: String): ListenableFuture<Void>
Removes a key from memory &disk.