Prajna


KVStore<'K, 'V>

KV class implements a distributed key-value store.

Instance members

Instance memberDescription
Clear()
Signature: unit -> unit

Clear KV store

Get(key)
Signature: key:'K -> 'V

Get value from key

GetAsync(key)
Signature: key:'K -> Task<'V>

Get value from key (async interface)

Put(key, value)
Signature: (key:'K * value:'V) -> unit

Store a key with value

StoreName
Signature: string
Update(key, delta_value)
Signature: (key:'K * delta_value:'V) -> unit

Update a key, The input will be a key and its delta value.

Static members

Static memberDescription
GetKVStore(kvStoreName, serverInfo)
Signature: (kvStoreName:String * serverInfo:ContractServersInfo) -> KVStore<'K,'V>

Find a specific distributed key value store to use, import the remote function to the local KVStore

StartService(...)
Signature: (kvStoreName:string * serverInfo:ContractServersInfo * comparerKey:IEqualityComparer<'K> * setInitialValue:('K -> 'V) * updateValue:('K * 'V * 'V -> 'V) * isEachKVPerFile:bool) -> unit

Launch a kv store service on a particular store

StopService(kvStoreName, serverInfo)
Signature: (kvStoreName:string * serverInfo:ContractServersInfo) -> unit

Stop a kv store service on a particular store

Fork me on GitHub