Show / Hide Table of Contents

Class CacheableKeyValueStore

The proxy class to cache IKeyValueStore operations.

Inheritance
Object
CacheableKeyValueStore
Implements
IKeyValueStore
IDisposable
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Libplanet.Store.Trie
Assembly: Libplanet.dll
Syntax
public class CacheableKeyValueStore : IKeyValueStore, IDisposable

Constructors

| Improve this Doc View Source

CacheableKeyValueStore(IKeyValueStore, Int32)

Creates a new CacheableKeyValueStore.

Declaration
public CacheableKeyValueStore(IKeyValueStore keyValueStore, int cacheSize = 100)
Parameters
Type Name Description
IKeyValueStore keyValueStore

An IKeyValueStore implementation to do real operations via CacheableKeyValueStore.

Int32 cacheSize

The capacity of the values cache.

Methods

| Improve this Doc View Source

Delete(Byte[])

Declaration
public void Delete(byte[] key)
Parameters
Type Name Description
Byte[] key
| Improve this Doc View Source

Dispose()

Declaration
public void Dispose()
| Improve this Doc View Source

Exists(Byte[])

Declaration
public bool Exists(byte[] key)
Parameters
Type Name Description
Byte[] key
Returns
Type Description
Boolean
| Improve this Doc View Source

Get(Byte[])

Declaration
public byte[] Get(byte[] key)
Parameters
Type Name Description
Byte[] key
Returns
Type Description
Byte[]
| Improve this Doc View Source

ListKeys()

Lists all keys that have been stored in the storage.

Declaration
public IEnumerable<byte[]> ListKeys()
Returns
Type Description
IEnumerable<Byte[]>

All keys in an arbitrary order. The order might be vary for each call.

| Improve this Doc View Source

Set(Byte[], Byte[])

Declaration
public void Set(byte[] key, byte[] value)
Parameters
Type Name Description
Byte[] key
Byte[] value

Implements

IKeyValueStore
System.IDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2018–2021 Planetarium