@ProviderType
public interface KeyValueDbService
KeyValueDbService provides APIs to use the functionalities a of a database capable of storing data in form of key-value pairs.| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ConnectionListener listener)
Adds a
ConnectionListener. |
void |
delete(java.lang.String key)
Delete a key with the specified value in the database
|
byte[] |
get(java.lang.String key)
Get a key with the specified value in the database
|
java.lang.String |
getAsString(java.lang.String key)
Get a key with the specified value in the database
|
boolean |
isConnected()
Returns whether the database is connected or not.
|
void |
removeListener(ConnectionListener listener)
Removes a
ConnectionListener |
void |
set(java.lang.String key,
byte[] value)
Set a key with the specified value in the database
|
void |
set(java.lang.String key,
java.lang.String value)
Set a key with the specified value in the database
|
void addListener(ConnectionListener listener)
ConnectionListener.listener - to addvoid removeListener(ConnectionListener listener)
ConnectionListenerlistener - to removeboolean isConnected()
void set(java.lang.String key,
byte[] value)
throws KuraException
key - the key namevalue - the value of the key as array of byteKuraException - if the operation is unsuccessfulvoid set(java.lang.String key,
java.lang.String value)
throws KuraException
key - the key namevalue - the value of the key as a String. The string encondig is platform dependentKuraException - if the operation is unsuccessfulbyte[] get(java.lang.String key)
throws KuraException
key - the key nameKuraException - if the operation is unsuccessfuljava.lang.String getAsString(java.lang.String key)
throws KuraException
key - the key nameKuraException - if the operation is unsuccessfulvoid delete(java.lang.String key)
throws KuraException
key - the key nameKuraException - if the operation is unsuccessful