Table of Contents

Class KvStoreClient

Namespace
Coherence.Cloud
Assembly
Coherence.Runtime.dll
public class KvStoreClient
Inheritance
KvStoreClient

Constructors

KvStoreClient(IRequestFactory, IAuthClient)

public KvStoreClient(IRequestFactory requestFactory, IAuthClient authClient)

Parameters

requestFactory IRequestFactory
authClient IAuthClient

Methods

Get(string, string)

Returns a value for a given key.

public string Get(string key, string defaultValue = null)

Parameters

key string
defaultValue string

Default value to be returned if the entry for a given key was not found.

Returns

string

Value for a given key or defaultValue if entry was not found.

Set(string, string)

Adds entry to the key-value store.

public bool Set(string key, string value)

Parameters

key string
value string

Returns

bool

True if entry was added (not necessarily synced yet). False if the key or value 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()