Versions in this module Expand all Collapse all v0 v0.0.1 May 3, 2023 Changes in this version + const DEFAULT_BUCKET_LOAD_FACTOR + const DEFAULT_BUCKET_MAX_SIZE + const DEFAULT_BUCKET_NUMBER + const MAX_CONCURRENCY + type Bucket interface + Clear func(lock sync.Locker) + Delete func(key string, lock sync.Locker) bool + Get func(key string) Pair + GetFirstPair func() Pair + Put func(p Pair, lock sync.Locker) (bool, error) + Size func() uint64 + String func() string + type BucketStatus uint8 + const BUCKET_STATUS_NORMAL + const BUCKET_STATUS_OVERWEIGHT + const BUCKET_STATUS_UNDERWEIGHT + type ConcurrentMap interface + Concurrency func() int + Delete func(key string) bool + Get func(key string) interface{} + Len func() uint64 + Put func(key string, element interface{}) (bool, error) + func NewConcurrentMap(concurrency int, pairRedistributor PairRedistributor) (ConcurrentMap, error) + type IllegalPairTypeError struct + func (ipte IllegalPairTypeError) Error() string + type IllegalParameterError struct + func (ipe IllegalParameterError) Error() string + type Pair interface + Copy func() Pair + Element func() interface{} + Hash func() uint64 + Key func() string + SetElement func(element interface{}) error + String func() string + type PairRedistributor interface + CheckBucketStatus func(pairTotal uint64, bucketSize uint64) (bucketStatus BucketStatus) + Redistribe func(bucketStatus BucketStatus, buckets []Bucket) (newBuckets []Bucket, changed bool) + UpdateThreshold func(pairTotal uint64, bucketNumber int) + type PairRedistributorError struct + func (pre PairRedistributorError) Error() string + type Segment interface + Delete func(key string) bool + Get func(key string) Pair + GetWithHash func(key string, keyHash uint64) Pair + Put func(p Pair) (bool, error) + Size func() uint64