statestore

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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) Get

func (db *MemoryStore) Get(prefix byte, key []byte) *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

Jump to

Keyboard shortcuts

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