Class KvStoreClient
public class KvStoreClient
- Inheritance
-
KvStoreClient
Constructors
KvStoreClient(IRequestFactory, IAuthClient)
public KvStoreClient(IRequestFactory requestFactory, IAuthClient authClient)
Parameters
requestFactoryIRequestFactoryauthClientIAuthClient
Methods
Get(string, string)
Returns a value for a given key.
public string Get(string key, string defaultValue = null)
Parameters
keystringdefaultValuestringDefault value to be returned if the entry for a given key was not found.
Returns
- string
Value for a given
keyordefaultValueif 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
keyorvalueare invalid.
Unset(string)
Removes entry from the key-value store.
public bool Unset(string key)
Parameters
keystring
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()