public class InMemoryMetadataStore extends java.lang.Object implements MetadataStore
MetadataStore
with no persistence on disk.Constructor and Description |
---|
InMemoryMetadataStore() |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,byte[]> |
all()
Returns all the entries in this metadata store.
|
void |
close()
Closes the metadata store, if applicable, relinquishing all the underlying resources
and connections.
|
void |
delete(java.lang.String key)
Deletes the mapping for the specified
key from this metadata store (if such mapping exists). |
void |
flush()
Flushes the metadata store, if applicable.
|
byte[] |
get(java.lang.String key)
Gets the value associated with the specified
key . |
void |
init()
Initializes the metadata store, if applicable, setting up the underlying resources
and connections to the store endpoints.
|
void |
put(java.lang.String key,
byte[] value)
Updates the mapping of the specified key-value pair.
|
public void init()
MetadataStore
init
in interface MetadataStore
public byte[] get(java.lang.String key)
MetadataStore
key
.get
in interface MetadataStore
key
- the key with which the associated value is to be fetched.key
; otherwise, null
.public void put(java.lang.String key, byte[] value)
MetadataStore
put
in interface MetadataStore
key
- the key with which the specified value
is to be associated.value
- the value with which the specified key
is to be associated.public void delete(java.lang.String key)
MetadataStore
key
from this metadata store (if such mapping exists).delete
in interface MetadataStore
key
- the key for which the mapping is to be deleted.public java.util.Map<java.lang.String,byte[]> all()
MetadataStore
all
in interface MetadataStore
public void flush()
MetadataStore
flush
in interface MetadataStore
public void close()
MetadataStore
close
in interface MetadataStore