Class KvStoreClient
public class KvStoreClient
- Inheritance
-
KvStoreClient
Constructors
KvStoreClient(IRequestFactory, IAuthClient)
public KvStoreClient(IRequestFactory requestFactory, IAuthClient authClient)
Parameters
requestFactory
IRequestFactoryauthClient
IAuthClient
Methods
Get(string, string)
Returns a value for a given key.
public string Get(string key, string defaultValue = null)
Parameters
key
stringdefaultValue
stringDefault value to be returned if the entry for a given key was not found.
Returns
- string
Value for a given
key
ordefaultValue
if entry was not found.
Set(string, string)
Adds entry to the key-value store.
public bool Set(string key, string value)
Parameters
Returns
- bool
True if entry was added (not necessarily synced yet). False if the
key
orvalue
are invalid.
Unset(string)
Removes entry from the key-value store.
public bool Unset(string key)
Parameters
key
string
Returns
- bool
True if an entry was removed, false otherwise.
Update()
Performs a key-value store sync with backend. Only one sync operation can be in flight at any given moment.
public void Update()