public interface KeyStore
KeyStore allows users to store data as a KeyValueNode. Information stored in KeyStore is distributed
across the controller cluster instances.
Application name separates the key spaces and hence different applications
can use same key names in the KeyStore. A user knowing the
application name and key can access the KeyValueNode from any
instance of the controller cluster.
KeyStore also provides query mechanism to get keys that belong to an
application.| Modifier and Type | Field and Description |
|---|---|
static int |
maxKeyValueSize |
| Modifier and Type | Method and Description |
|---|---|
KeyValueNode |
createNode(String appName,
String key,
byte[] value)
Create a
|
List<String> |
getKeys(String appName)
Query for list of key strings for a application name stored in the
distributed KeyStore.
|
KeyValueNode |
getNode(String appName,
String key)
Get a KeyValueNode identified by the application name and the key.
|
static final int maxKeyValueSize
KeyValueNode getNode(String appName, String key) throws KeyStoreException.KeyNotFoundException, ServiceNotAvailableException, InterruptedException
appName - application namekey - key for the stored dataKeyStoreException.KeyNotFoundException - Key not foundInterruptedException - Operation interrupted exceptionServiceNotAvailableException - Service is not UpKeyValueNode createNode(String appName, String key, byte[] value) throws KeyStoreException.KeyExistsException, ServiceNotAvailableException, InterruptedException
appName - application namekey - key for stored datavalue - data for the node to be created. "null" is valid dataKeyStoreException.KeyExistsException - Key existsInterruptedException - Operation interrupted exceptionServiceNotAvailableException - Service is not UpList<String> getKeys(String appName) throws ServiceNotAvailableException, InterruptedException
appName - Application nameInterruptedException - Operation interrupted exceptionServiceNotAvailableException - Service is not UpCopyright © 2014. All Rights Reserved.