buckettree

package
v0.0.0-...-667e438 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigBucketCacheMaxSize = "bucketcachesize"
View Source
const ConfigHashFunction = "hashfunction"

ConfigHashFunction - config name 'hashFunction'. This is not exposed in yaml file. This configuration is used for testing with custom hash-function

View Source
const ConfigMaxGroupingAtEachLevel = "maxgroupingateachlevel"

ConfigMaxGroupingAtEachLevel - config name 'maxGroupingAtEachLevel' as it appears in yaml file

View Source
const ConfigNumBuckets = "numbuckets"

ConfigNumBuckets - config name 'numBuckets' as it appears in yaml file

View Source
const ConfigPartialDelta = "syncdelta"
View Source
const DefaultMaxGroupingAtEachLevel = 10

DefaultMaxGroupingAtEachLevel - Number of max buckets to group at each level. Grouping is started from left. The last group may have less buckets

View Source
const DefaultNumBuckets = 10009

DefaultNumBuckets - total buckets

Variables

This section is empty.

Functions

This section is empty.

Types

type PartialSnapshotIterator

type PartialSnapshotIterator struct {
	StateSnapshotIterator
	// contains filtered or unexported fields
}

func (*PartialSnapshotIterator) GetMetaData

func (partialItr *PartialSnapshotIterator) GetMetaData() *protos.SyncMetadata

func (*PartialSnapshotIterator) GetRawKeyValue

func (partialItr *PartialSnapshotIterator) GetRawKeyValue() ([]byte, []byte)

func (*PartialSnapshotIterator) Next

func (partialItr *PartialSnapshotIterator) Next() bool

overwrite the original GetRawKeyValue and Next

func (*PartialSnapshotIterator) Seek

func (partialItr *PartialSnapshotIterator) Seek(offset *protos.SyncOffset) error

func (PartialSnapshotIterator) Verify

func (config PartialSnapshotIterator) Verify(level, startBucket, endBucket int) error

type RangeScanIterator

type RangeScanIterator struct {
	// contains filtered or unexported fields
}

RangeScanIterator implements the interface 'statemgmt.RangeScanIterator'

func (*RangeScanIterator) Close

func (itr *RangeScanIterator) Close()

Close - see interface 'statemgmt.RangeScanIterator' for details

func (*RangeScanIterator) GetKeyValue

func (itr *RangeScanIterator) GetKeyValue() (string, []byte)

GetKeyValue - see interface 'statemgmt.RangeScanIterator' for details

func (*RangeScanIterator) Next

func (itr *RangeScanIterator) Next() bool

Next - see interface 'statemgmt.RangeScanIterator' for details

type StateImpl

type StateImpl struct {
	*db.OpenchainDB
	// contains filtered or unexported fields
}

StateImpl - implements the interface - 'statemgmt.HashableState'

func NewStateImpl

func NewStateImpl(db *db.OpenchainDB) *StateImpl

NewStateImpl constructs a new StateImpl

func (*StateImpl) AddChangesForPersistence

func (stateImpl *StateImpl) AddChangesForPersistence(writeBatch *db.DBWriteBatch) error

AddChangesForPersistence - method implementation for interface 'statemgmt.HashableState'

func (*StateImpl) ApplyPartialSync

func (stateImpl *StateImpl) ApplyPartialSync(syncData *pb.SyncStateChunk) error

An PrepareWorkingSet must have been called before, we do this like a calling of ClearWorkingSet(true), verify the delta

func (*StateImpl) ClearWorkingSet

func (stateImpl *StateImpl) ClearWorkingSet(changesPersisted bool)

ClearWorkingSet - method implementation for interface 'statemgmt.HashableState'

func (*StateImpl) ComputeCryptoHash

func (stateImpl *StateImpl) ComputeCryptoHash() ([]byte, error)

ComputeCryptoHash - method implementation for interface 'statemgmt.HashableState'

func (*StateImpl) Get

func (stateImpl *StateImpl) Get(chaincodeID string, key string) ([]byte, error)

Get - method implementation for interface 'statemgmt.HashableState'

func (*StateImpl) GetPartialRangeIterator

func (stateImpl *StateImpl) GetPartialRangeIterator(snapshot *db.DBSnapshot) (statemgmt.PartialRangeIterator, error)

func (*StateImpl) GetRangeScanIterator

func (stateImpl *StateImpl) GetRangeScanIterator(chaincodeID string, startKey string, endKey string) (statemgmt.RangeScanIterator, error)

GetRangeScanIterator - method implementation for interface 'statemgmt.HashableState'

func (*StateImpl) GetSafe

func (stateImpl *StateImpl) GetSafe(sn *db.DBSnapshot, chaincodeID string, key string) ([]byte, error)

func (*StateImpl) GetStateSnapshotIterator

func (stateImpl *StateImpl) GetStateSnapshotIterator(snapshot *db.DBSnapshot) (statemgmt.StateSnapshotIterator, error)

GetStateSnapshotIterator - method implementation for interface 'statemgmt.HashableState'

func (*StateImpl) InitPartialSync

func (stateImpl *StateImpl) InitPartialSync(statehash []byte)

func (*StateImpl) Initialize

func (stateImpl *StateImpl) Initialize(configs map[string]interface{}) error

Initialize - method implementation for interface 'statemgmt.HashableState'

func (*StateImpl) IsCompleted

func (stateImpl *StateImpl) IsCompleted() bool

func (*StateImpl) NewSnapshotState

func (stateImpl *StateImpl) NewSnapshotState() statemgmt.SnapshotState

notice the general snapshotstate is not related to a stateimpl object it just make use of the config in stateimpl for creating

func (*StateImpl) PerfHintKeyChanged

func (stateImpl *StateImpl) PerfHintKeyChanged(chaincodeID string, key string)

PerfHintKeyChanged - method implementation for interface 'statemgmt.HashableState'

func (*StateImpl) PrepareWorkingSet

func (stateImpl *StateImpl) PrepareWorkingSet(stateDelta *statemgmt.StateDelta) error

PrepareWorkingSet - method implementation for interface 'statemgmt.HashableState'

func (*StateImpl) RequiredParts

func (stateImpl *StateImpl) RequiredParts() ([]*pb.SyncOffset, error)

func (*StateImpl) SyncTarget

func (stateImpl *StateImpl) SyncTarget() []byte

type StateSnapshotIterator

type StateSnapshotIterator struct {
	// contains filtered or unexported fields
}

StateSnapshotIterator implements the interface 'statemgmt.StateSnapshotIterator'

func (*StateSnapshotIterator) Close

func (snapshotItr *StateSnapshotIterator) Close()

Close - see interface 'statemgmt.StateSnapshotIterator' for details

func (*StateSnapshotIterator) GetRawKeyValue

func (snapshotItr *StateSnapshotIterator) GetRawKeyValue() ([]byte, []byte)

GetRawKeyValue - see interface 'statemgmt.StateSnapshotIterator' for details

func (*StateSnapshotIterator) Next

func (snapshotItr *StateSnapshotIterator) Next() bool

Next - see interface 'statemgmt.StateSnapshotIterator' for details

func (*StateSnapshotIterator) Valid

func (snapshotItr *StateSnapshotIterator) Valid() bool

Jump to

Keyboard shortcuts

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