public class StorageMap
extends java.lang.Object
| Constructor and Description |
|---|
StorageMap(StorageContext context,
byte[] prefix)
Constructs a new StorageMep from entries with the given prefix in the given
StorageContext. |
| Modifier and Type | Method and Description |
|---|---|
void |
delete(byte[] key)
Deletes the entry with a key equal to
prefix + key from the underlying storage
context. |
void |
delete(java.lang.String key)
Deletes the entry with a key equal to
prefix + key from the underlying storage
context. |
byte[] |
get(byte[] key)
Gets the value with a key equal to
prefix + key from the underlying storage context. |
byte[] |
get(java.lang.String key)
Gets the value with a key equal to
prefix + key from the underlying storage context. |
void |
put(byte[] key,
byte[] value)
Stores the given key-value pair prefixed with this StorageMap's prefix (
prefix + key) into the underlying storage context. |
void |
put(byte[] key,
int value)
Stores the given key-value pair prefixed with this StorageMap's prefix (
prefix + key) into the underlying storage context. |
void |
put(byte[] key,
java.lang.String value)
Stores the given key-value pair prefixed with this StorageMap's prefix (
prefix + key) into the underlying storage context. |
void |
put(java.lang.String key,
byte[] value)
Stores the given key-value pair prefixed with this StorageMap's prefix (
prefix + key) into the underlying storage context. |
void |
put(java.lang.String key,
int value)
Stores the given key-value pair prefixed with this StorageMap's prefix (
prefix + key) into the underlying storage context. |
void |
put(java.lang.String key,
java.lang.String value)
Stores the given key-value pair prefixed with this StorageMap's prefix (
prefix + key) into the underlying storage context. |
public StorageMap(StorageContext context, byte[] prefix)
StorageContext.context - The storage to look for the entries.prefix - The prefix.public void delete(byte[] key)
prefix + key from the underlying storage
context.key - The key to delete.public void delete(java.lang.String key)
prefix + key from the underlying storage
context.key - The key to delete.public byte[] get(byte[] key)
prefix + key from the underlying storage context.key - The key of the value to retrieve.public byte[] get(java.lang.String key)
prefix + key from the underlying storage context.key - The key of the value to retrieve.public void put(byte[] key,
byte[] value)
prefix + key) into the underlying storage context.key - The key of the entry.value - The value of the entry.public void put(byte[] key,
int value)
prefix + key) into the underlying storage context.key - The key of the entry.value - The value of the entry.public void put(byte[] key,
java.lang.String value)
prefix + key) into the underlying storage context.key - The key of the entry.value - The value of the entry.public void put(java.lang.String key,
byte[] value)
prefix + key) into the underlying storage context.key - The key of the entry.value - The value of the entry.public void put(java.lang.String key,
int value)
prefix + key) into the underlying storage context.key - The key of the entry.value - The value of the entry.public void put(java.lang.String key,
java.lang.String value)
prefix + key) into the underlying storage context.key - The key of the entry.value - The value of the entry.