Versions in this module Expand all Collapse all v3 v3.0.1 Dec 26, 2023 v3.0.0 Dec 23, 2022 Changes in this version + func NewCacheWrapToDBHandle(c Cache, innerDb protocol.DBHandle, l protocol.Logger) protocol.DBHandle + func QuickSort(arr []uint64) []uint64 + func SystemQuickSort(arr []uint64) + type Cache interface + Close func() error + Delete func(key string) error + Get func(key string) ([]byte, error) + Reset func() error + Set func(key string, entry []byte) error + type CacheWrapToDBHandle struct + func (c *CacheWrapToDBHandle) Close() error + func (c *CacheWrapToDBHandle) CompactRange(start, limit []byte) error + func (c *CacheWrapToDBHandle) Delete(key []byte) error + func (c *CacheWrapToDBHandle) Get(key []byte) ([]byte, error) + func (c *CacheWrapToDBHandle) GetDbType() string + func (c *CacheWrapToDBHandle) GetKeys(keys [][]byte) ([][]byte, error) + func (c *CacheWrapToDBHandle) GetWriteBatchSize() uint64 + func (c *CacheWrapToDBHandle) Has(key []byte) (bool, error) + func (c *CacheWrapToDBHandle) NewIteratorWithPrefix(prefix []byte) (protocol.Iterator, error) + func (c *CacheWrapToDBHandle) NewIteratorWithRange(start []byte, limit []byte) (protocol.Iterator, error) + func (c *CacheWrapToDBHandle) Put(key []byte, value []byte) error + func (c *CacheWrapToDBHandle) WriteBatch(batch protocol.StoreBatcher, sync bool) error + type StoreCacheMgr struct + func NewStoreCacheMgr(chainId string, blockWriteBufferSize int, logger protocol.Logger) *StoreCacheMgr + func (mgr *StoreCacheMgr) AddBlock(blockHeight uint64, updateBatch protocol.StoreBatcher) + func (mgr *StoreCacheMgr) Clear() + func (mgr *StoreCacheMgr) DelBlock(blockHeight uint64) + func (mgr *StoreCacheMgr) Get(key string) ([]byte, bool) + func (mgr *StoreCacheMgr) GetBatch(height uint64) (protocol.StoreBatcher, error) + func (mgr *StoreCacheMgr) GetLength() int + func (mgr *StoreCacheMgr) Has(key string) (bool, bool) + func (mgr *StoreCacheMgr) HasFromHeight(key string, startHeight uint64, endHeight uint64) (bool, bool) + func (mgr *StoreCacheMgr) KVRange(startKey []byte, endKey []byte) (map[string][]byte, error) + func (mgr *StoreCacheMgr) LockForFlush() + func (mgr *StoreCacheMgr) UnLockFlush() Other modules containing this package chainmaker.org/chainmaker/store/v2