Documentation
¶
Index ¶
- func KeyToStr(key states.IStateKeyInterface) string
- type CloneCache
- func (cloneCache *CloneCache) Commit()
- func (cloneCache *CloneCache) Find(prefix blockchain.EntryPrefix, keyPreFix string) database.Iterator
- func (cloneCache *CloneCache) GetInnerCache() DBCache
- func (cloneCache *CloneCache) TryDelete(prefix blockchain.EntryPrefix, hash common.Uint168) bool
- func (cloneCache *CloneCache) TryGet(prefix blockchain.EntryPrefix, key string) (states.IStateValueInterface, error)
- type DBCache
- type RWSet
- type Read
- type Write
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyToStr ¶
func KeyToStr(key states.IStateKeyInterface) string
Types ¶
type CloneCache ¶
type CloneCache struct {
// contains filtered or unexported fields
}
func NewCloneDBCache ¶
func NewCloneDBCache(innerCache DBCache, dbCache DBCache) *CloneCache
func (*CloneCache) Commit ¶
func (cloneCache *CloneCache) Commit()
func (*CloneCache) Find ¶
func (cloneCache *CloneCache) Find(prefix blockchain.EntryPrefix, keyPreFix string) database.Iterator
func (*CloneCache) GetInnerCache ¶
func (cloneCache *CloneCache) GetInnerCache() DBCache
func (*CloneCache) TryDelete ¶
func (cloneCache *CloneCache) TryDelete(prefix blockchain.EntryPrefix, hash common.Uint168) bool
func (*CloneCache) TryGet ¶
func (cloneCache *CloneCache) TryGet(prefix blockchain.EntryPrefix, key string) (states.IStateValueInterface, error)
type DBCache ¶
type DBCache interface {
GetOrAdd(prefix blockchain.EntryPrefix, key string, value states.IStateValueInterface) (states.IStateValueInterface, error)
TryGet(prefix blockchain.EntryPrefix, key string) (states.IStateValueInterface, error)
TryDelete(prefix blockchain.EntryPrefix, key string) bool
GetWriteSet() *RWSet
FindInternal(prefix blockchain.EntryPrefix, keyPrefix string) database.Iterator
}
type RWSet ¶
func (*RWSet) Add ¶
func (rw *RWSet) Add(prefix blockchain.EntryPrefix, key string, value states.IStateValueInterface) error
func (*RWSet) Delete ¶
func (rw *RWSet) Delete(prefix blockchain.EntryPrefix, key string)
type Read ¶
type Read struct {
Key states.IStateKeyInterface
Version string
}
type Write ¶
type Write struct {
Prefix blockchain.EntryPrefix
Key string
Item states.IStateValueInterface
IsDeleted bool
}
Click to show internal directories.
Click to hide internal directories.