public interface Storage
isPersisted() to check if the data are being persisted.| Modifier and Type | Interface and Description |
|---|---|
static interface |
Storage.Batch
Represents a batch of edits to be applied to storage in one transaction.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getItem(java.lang.String key)
Returns the item associated with
key, or null if no item is associated with it. |
boolean |
isPersisted()
Returns true if storage data will be persistent across restarts.
|
java.lang.Iterable<java.lang.String> |
keys()
Returns an object that can be used to iterate over all storage keys.
|
void |
removeItem(java.lang.String key)
Removes the item in the Storage associated with the specified key.
|
void |
setItem(java.lang.String key,
java.lang.String data)
Sets the value associated with the specified key to
data. |
Storage.Batch |
startBatch()
Creates a
Storage.Batch that can be used to effect multiple changes to storage in a single,
more efficient, operation. |
void setItem(java.lang.String key,
java.lang.String data)
data.key - identifies the value.data - the value associated with the key, which must not be null.void removeItem(java.lang.String key)
key - identifies the value.java.lang.String getItem(java.lang.String key)
key, or null if no item is associated with it.key - identifies the value.Storage.Batch startBatch()
Storage.Batch that can be used to effect multiple changes to storage in a single,
more efficient, operation.java.lang.Iterable<java.lang.String> keys()
boolean isPersisted()
Copyright © 2018. All Rights Reserved.