Documentation ¶
Index ¶
- Constants
- type BucketResolveFunc
- type BucketSortFunc
- type BucketState
- type BucketValueSelector
- type KeyIndexGetterFunc
- type ReadOnlyMapToInt63
- func (p *ReadOnlyMapToInt63) GetHashSeed() uint32
- func (p *ReadOnlyMapToInt63) GetLocator(bucketIndex int) int64
- func (p *ReadOnlyMapToInt63) GetValueOrBucket(ref reference.PtrHolder) (int64, bool)
- func (p *ReadOnlyMapToInt63) LoadBucket(bucketIndex, bucketKeyL0Count, bucketKeyL1Count int, ...) error
- func (p *ReadOnlyMapToInt63) SetBigBucketMinSize(bigBucketSize int)
- func (p *ReadOnlyMapToInt63) SetHashSeed(hashSeed uint32)
- func (p *ReadOnlyMapToInt63) SetLocator(bucketIndex int, locator int64)
- func (p *ReadOnlyMapToInt63) SetSortedBuckets(sortedBuckets bool)
- type RefLocatorMap
- func (m *RefLocatorMap) Contains(ref reference.PtrHolder) bool
- func (m *RefLocatorMap) Delete(ref reference.PtrHolder)
- func (m *RefLocatorMap) FillLocatorBuckets(config WriteBucketerConfig) WriteBucketer
- func (m *RefLocatorMap) Get(ref reference.PtrHolder) (ValueLocator, bool)
- func (m *RefLocatorMap) Intern(ref reference.PtrHolder) reference.Holder
- func (m *RefLocatorMap) Len() int
- func (m *RefLocatorMap) Put(ref reference.PtrHolder, v ValueLocator) (internedRef reference.Holder)
- type UpdateableKeyMap
- func (m *UpdateableKeyMap) Find(key reference.PtrHolder) (BucketValueSelector, bool)
- func (m *UpdateableKeyMap) GetHashSeed() uint32
- func (m *UpdateableKeyMap) GetInterned(bucketIndex uint32) (*reference.Local, BucketState)
- func (m *UpdateableKeyMap) Intern(ref *reference.Local) *reference.Local
- func (m *UpdateableKeyMap) InternHolder(ref reference.PtrHolder) reference.Holder
- func (m *UpdateableKeyMap) InternedKeyCount() int
- func (m *UpdateableKeyMap) SetHashSeed(hashSeed uint32)
- func (m *UpdateableKeyMap) TryPut(key reference.PtrHolder, ...) bool
- func (m *UpdateableKeyMap) TryTouch(key reference.PtrHolder, ...) bool
- type ValueLocator
- type ValueSelector
- type ValueSelectorLocator
- type WriteBucketer
- type WriteBucketerConfig
Constants ¶
View Source
const MaxBucketPageSize = 65536
View Source
const MinBucketPageSize = 16
View Source
const MinKeyBucketBatchSize = 8 // min batch size for multi-batch buckets (except the last batch)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BucketResolveFunc ¶
type BucketResolveFunc func(uint32) (*reference.Local, BucketState)
type BucketSortFunc ¶
type BucketState ¶
type BucketState uint32
type BucketValueSelector ¶
type BucketValueSelector struct { ValueSelector State BucketState }
type KeyIndexGetterFunc ¶
type KeyIndexGetterFunc func(index int) *bucketKey
type ReadOnlyMapToInt63 ¶
type ReadOnlyMapToInt63 struct {
// contains filtered or unexported fields
}
implements READ-ONLY map[Holder]uint63 with external lazy load & memory-mapping support
func NewReadOnlyMapToInt63 ¶
func NewReadOnlyMapToInt63(expectedKeyCount int, bucketCount int) ReadOnlyMapToInt63
func (*ReadOnlyMapToInt63) GetHashSeed ¶
func (p *ReadOnlyMapToInt63) GetHashSeed() uint32
func (*ReadOnlyMapToInt63) GetLocator ¶
func (p *ReadOnlyMapToInt63) GetLocator(bucketIndex int) int64
func (*ReadOnlyMapToInt63) GetValueOrBucket ¶
func (p *ReadOnlyMapToInt63) GetValueOrBucket(ref reference.PtrHolder) (int64, bool)
result = ( N, true ) - item was found, N = map[ref], N = [0..maxInt64] result = ( <0, false ) - item was not found result = ( B>=0, false) - item presence is unknown, bucket is missing, B is bucket number
func (*ReadOnlyMapToInt63) LoadBucket ¶
func (p *ReadOnlyMapToInt63) LoadBucket(bucketIndex, bucketKeyL0Count, bucketKeyL1Count int, chunks []longbits.ByteString) error
func (*ReadOnlyMapToInt63) SetBigBucketMinSize ¶
func (p *ReadOnlyMapToInt63) SetBigBucketMinSize(bigBucketSize int)
func (*ReadOnlyMapToInt63) SetHashSeed ¶
func (p *ReadOnlyMapToInt63) SetHashSeed(hashSeed uint32)
func (*ReadOnlyMapToInt63) SetLocator ¶
func (p *ReadOnlyMapToInt63) SetLocator(bucketIndex int, locator int64)
func (*ReadOnlyMapToInt63) SetSortedBuckets ¶
func (p *ReadOnlyMapToInt63) SetSortedBuckets(sortedBuckets bool)
type RefLocatorMap ¶
type RefLocatorMap struct {
// contains filtered or unexported fields
}
func NewRefLocatorMap ¶
func NewRefLocatorMap() RefLocatorMap
func (*RefLocatorMap) Delete ¶
func (m *RefLocatorMap) Delete(ref reference.PtrHolder)
func (*RefLocatorMap) FillLocatorBuckets ¶
func (m *RefLocatorMap) FillLocatorBuckets(config WriteBucketerConfig) WriteBucketer
func (*RefLocatorMap) Get ¶
func (m *RefLocatorMap) Get(ref reference.PtrHolder) (ValueLocator, bool)
func (*RefLocatorMap) Intern ¶
func (m *RefLocatorMap) Intern(ref reference.PtrHolder) reference.Holder
func (*RefLocatorMap) Len ¶
func (m *RefLocatorMap) Len() int
func (*RefLocatorMap) Put ¶
func (m *RefLocatorMap) Put(ref reference.PtrHolder, v ValueLocator) (internedRef reference.Holder)
type UpdateableKeyMap ¶
type UpdateableKeyMap struct {
// contains filtered or unexported fields
}
func NewUpdateableKeyMap ¶
func NewUpdateableKeyMap() UpdateableKeyMap
func NewUpdateableKeyMapExt ¶
func NewUpdateableKeyMapExt(pageSize int) UpdateableKeyMap
func (*UpdateableKeyMap) Find ¶
func (m *UpdateableKeyMap) Find(key reference.PtrHolder) (BucketValueSelector, bool)
func (*UpdateableKeyMap) GetHashSeed ¶
func (m *UpdateableKeyMap) GetHashSeed() uint32
func (*UpdateableKeyMap) GetInterned ¶
func (m *UpdateableKeyMap) GetInterned(bucketIndex uint32) (*reference.Local, BucketState)
func (*UpdateableKeyMap) Intern ¶
func (m *UpdateableKeyMap) Intern(ref *reference.Local) *reference.Local
func (*UpdateableKeyMap) InternHolder ¶
func (m *UpdateableKeyMap) InternHolder(ref reference.PtrHolder) reference.Holder
func (*UpdateableKeyMap) InternedKeyCount ¶
func (m *UpdateableKeyMap) InternedKeyCount() int
func (*UpdateableKeyMap) SetHashSeed ¶
func (m *UpdateableKeyMap) SetHashSeed(hashSeed uint32)
func (*UpdateableKeyMap) TryPut ¶
func (m *UpdateableKeyMap) TryPut(key reference.PtrHolder, valueFn func(internedKey reference.Holder, selector BucketValueSelector) BucketState, ) bool
func (*UpdateableKeyMap) TryTouch ¶
func (m *UpdateableKeyMap) TryTouch(key reference.PtrHolder, valueFn func(selector BucketValueSelector) BucketState, ) bool
type ValueLocator ¶
type ValueLocator int64
type ValueSelector ¶
type ValueSelectorLocator ¶
type ValueSelectorLocator struct {
// contains filtered or unexported fields
}
type WriteBucketer ¶
type WriteBucketer struct {
// contains filtered or unexported fields
}
func NewWriteBucketer ¶
func NewWriteBucketer(keyMap *UpdateableKeyMap, valueCount int, config WriteBucketerConfig) WriteBucketer
func (*WriteBucketer) AddValue ¶
func (p *WriteBucketer) AddValue(selector ValueSelector, locator ValueLocator)
func (*WriteBucketer) AdjustedBucketSize ¶
func (p *WriteBucketer) AdjustedBucketSize() int
func (*WriteBucketer) BucketCount ¶
func (p *WriteBucketer) BucketCount() int
func (*WriteBucketer) GetBucketed ¶
func (p *WriteBucketer) GetBucketed(bucketNo int) []ValueSelectorLocator
type WriteBucketerConfig ¶
Click to show internal directories.
Click to hide internal directories.