cachekv

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2023 License: Apache-2.0, Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PreChangesHandler added in v1.3.0

type PreChangesHandler func(keys []string, setOrDel []byte)

type Store

type Store struct {
	trace.StatisticsCell
	// contains filtered or unexported fields
}

Store wraps an in-memory cache around an underlying types.KVStore.

func NewStore

func NewStore(parent types.KVStore) *Store

func NewStoreWithPreChangeHandler added in v1.3.0

func NewStoreWithPreChangeHandler(parent types.KVStore, preChangesHandler PreChangesHandler) *Store

func (*Store) CacheWrap

func (store *Store) CacheWrap() types.CacheWrap

Implements CacheWrapper.

func (*Store) CacheWrapWithTrace

func (store *Store) CacheWrapWithTrace(w io.Writer, tc types.TraceContext) types.CacheWrap

CacheWrapWithTrace implements the CacheWrapper interface.

func (*Store) Clear added in v1.5.4

func (store *Store) Clear()

Clear will clear all internal data without writing to the parent.

func (*Store) CopyRWSet added in v1.6.7

func (store *Store) CopyRWSet(rw types.CacheKVRWSet)

func (*Store) Delete

func (store *Store) Delete(key []byte)

Implements types.KVStore.

func (*Store) DisableCacheReadList added in v1.5.6

func (store *Store) DisableCacheReadList()

func (*Store) EndTiming added in v1.6.7

func (store *Store) EndTiming(tag string)

func (*Store) Get

func (store *Store) Get(key []byte) (value []byte)

Implements types.KVStore.

func (*Store) GetRWSet added in v1.6.7

func (store *Store) GetRWSet(mp types.MsRWSet)

func (*Store) GetStoreType

func (store *Store) GetStoreType() types.StoreType

Implements Store.

func (*Store) Has

func (store *Store) Has(key []byte) bool

Implements types.KVStore.

func (*Store) Iterator

func (store *Store) Iterator(start, end []byte) types.Iterator

Implements types.KVStore.

func (*Store) IteratorCache

func (store *Store) IteratorCache(isdirty bool, cb func(key string, value []byte, isDirty bool, isDelete bool, sKey types.StoreKey) bool, sKey types.StoreKey) bool

func (*Store) Reset added in v1.5.4

func (store *Store) Reset(parent types.KVStore)

Reset will clear all internal data without writing to the parent and set the new parent.

func (*Store) ReverseIterator

func (store *Store) ReverseIterator(start, end []byte) types.Iterator

Implements types.KVStore.

func (*Store) Set

func (store *Store) Set(key []byte, value []byte)

Implements types.KVStore.

func (*Store) StartTiming added in v1.6.7

func (store *Store) StartTiming()

func (*Store) Write

func (store *Store) Write()

Implements Cachetypes.KVStore.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL