Documentation ¶
Index ¶
- type MemoryStore
- func (db *MemoryStore) Delete(prefix byte, key []byte)
- func (db *MemoryStore) Find() []*common.StateItem
- func (db *MemoryStore) Get(prefix byte, key []byte) *common.StateItem
- func (db *MemoryStore) GetChangeSet() map[string]*common.StateItem
- func (db *MemoryStore) Put(prefix byte, key []byte, value states.StateValue, state common.ItemState)
- type StateBatch
- func (self *StateBatch) CommitTo() error
- func (self *StateBatch) Error() error
- func (self *StateBatch) Find(prefix common.DataEntryPrefix, key []byte) ([]*common.StateItem, error)
- func (self *StateBatch) SetError(err error)
- func (self *StateBatch) TryAdd(prefix common.DataEntryPrefix, key []byte, value states.StateValue)
- func (self *StateBatch) TryDelete(prefix common.DataEntryPrefix, key []byte)
- func (self *StateBatch) TryGet(prefix common.DataEntryPrefix, key []byte) (*common.StateItem, error)
- func (self *StateBatch) TryGetOrAdd(prefix common.DataEntryPrefix, key []byte, value states.StateValue) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemDatabase ¶
func NewMemDatabase() *MemoryStore
func (*MemoryStore) Delete ¶
func (db *MemoryStore) Delete(prefix byte, key []byte)
func (*MemoryStore) Find ¶
func (db *MemoryStore) Find() []*common.StateItem
func (*MemoryStore) GetChangeSet ¶
func (db *MemoryStore) GetChangeSet() map[string]*common.StateItem
func (*MemoryStore) Put ¶
func (db *MemoryStore) Put(prefix byte, key []byte, value states.StateValue, state common.ItemState)
type StateBatch ¶
type StateBatch struct {
// contains filtered or unexported fields
}
func NewStateStoreBatch ¶
func NewStateStoreBatch(memoryStore common.MemoryCacheStore, store common.PersistStore) *StateBatch
func (*StateBatch) CommitTo ¶
func (self *StateBatch) CommitTo() error
func (*StateBatch) Error ¶
func (self *StateBatch) Error() error
func (*StateBatch) Find ¶
func (self *StateBatch) Find(prefix common.DataEntryPrefix, key []byte) ([]*common.StateItem, error)
func (*StateBatch) SetError ¶ added in v1.0.0
func (self *StateBatch) SetError(err error)
func (*StateBatch) TryAdd ¶
func (self *StateBatch) TryAdd(prefix common.DataEntryPrefix, key []byte, value states.StateValue)
func (*StateBatch) TryDelete ¶
func (self *StateBatch) TryDelete(prefix common.DataEntryPrefix, key []byte)
func (*StateBatch) TryGet ¶
func (self *StateBatch) TryGet(prefix common.DataEntryPrefix, key []byte) (*common.StateItem, error)
func (*StateBatch) TryGetOrAdd ¶
func (self *StateBatch) TryGetOrAdd(prefix common.DataEntryPrefix, key []byte, value states.StateValue) error
Click to show internal directories.
Click to hide internal directories.