Documentation ¶
Index ¶
- type Counter
- type DoubleKeyLRUCounter
- type U128LRU
- func (m *U128LRU) Add(key0, key1 uint64, value interface{})
- func (m *U128LRU) AddOrGet(key0, key1 uint64, value interface{}) *interface{}
- func (m *U128LRU) Clear()
- func (m *U128LRU) Close() error
- func (m *U128LRU) Get(key0, key1 uint64, peek bool) (interface{}, bool)
- func (m *U128LRU) GetCollisionChain() []byte
- func (m *U128LRU) GetCounter() interface{}
- func (m *U128LRU) ID() string
- func (m *U128LRU) KeySize() int
- func (m *U128LRU) NoStats() *U128LRU
- func (m *U128LRU) Remove(key0, key1 uint64)
- func (m *U128LRU) SetCollisionChainDebugThreshold(t int)
- func (m *U128LRU) Size() int
- func (m *U128LRU) Walk(callback walkCallback)
- type U128U64DoubleKeyLRU
- func (m *U128U64DoubleKeyLRU) Add(longKey0, longKey1, shortKey uint64, value interface{})
- func (m *U128U64DoubleKeyLRU) AddByShortKey(longKey0s, longKey1s []uint64, shortKey uint64, values []interface{})
- func (m *U128U64DoubleKeyLRU) Clear()
- func (m *U128U64DoubleKeyLRU) Get(longKey0, longKey1 uint64, peek bool) (interface{}, bool)
- func (m *U128U64DoubleKeyLRU) GetCollisionChain() []byte
- func (m *U128U64DoubleKeyLRU) GetCounter() interface{}
- func (m *U128U64DoubleKeyLRU) ID() string
- func (m *U128U64DoubleKeyLRU) KeySize() int
- func (m *U128U64DoubleKeyLRU) NoStats() *U128U64DoubleKeyLRU
- func (m *U128U64DoubleKeyLRU) PeekByShortKey(shortKey uint64) ([]interface{}, bool)
- func (m *U128U64DoubleKeyLRU) Remove(longKey0, longKey1 uint64)
- func (m *U128U64DoubleKeyLRU) RemoveByShortKey(shortKey uint64) int
- func (m *U128U64DoubleKeyLRU) SetCollisionChainDebugThreshold(t int)
- func (m *U128U64DoubleKeyLRU) Size() int
- func (m *U128U64DoubleKeyLRU) Walk(callback func(longKey0, longKey1 uint64, value interface{}))
- type U64DoubleKeyLRU
- func (m *U64DoubleKeyLRU) Add(key uint64, shortKey uint64, value interface{})
- func (m *U64DoubleKeyLRU) AddByShortKey(keys []uint64, shortKey uint64, values []interface{})
- func (m *U64DoubleKeyLRU) Clear()
- func (m *U64DoubleKeyLRU) Get(key uint64, peek bool) (interface{}, bool)
- func (m *U64DoubleKeyLRU) GetCollisionChain() []byte
- func (m *U64DoubleKeyLRU) GetCounter() interface{}
- func (m *U64DoubleKeyLRU) ID() string
- func (m *U64DoubleKeyLRU) KeySize() int
- func (m *U64DoubleKeyLRU) NoStats() *U64DoubleKeyLRU
- func (m *U64DoubleKeyLRU) PeekByShortKey(key uint64) ([]interface{}, bool)
- func (m *U64DoubleKeyLRU) Remove(key uint64)
- func (m *U64DoubleKeyLRU) RemoveByShortKey(key uint64) int
- func (m *U64DoubleKeyLRU) SetCollisionChainDebugThreshold(t int)
- func (m *U64DoubleKeyLRU) Size() int
- func (m *U64DoubleKeyLRU) Walk(callback func(key uint64, value interface{}))
- type U64LRU
- func (m *U64LRU) Add(key uint64, value interface{})
- func (m *U64LRU) Clear()
- func (m *U64LRU) Close() error
- func (m *U64LRU) Get(key uint64, peek bool) (interface{}, bool)
- func (m *U64LRU) GetCollisionChain() []byte
- func (m *U64LRU) GetCounter() interface{}
- func (m *U64LRU) ID() string
- func (m *U64LRU) KeySize() int
- func (m *U64LRU) NoStats() *U64LRU
- func (m *U64LRU) Remove(key uint64)
- func (m *U64LRU) SetCollisionChainDebugThreshold(t int)
- func (m *U64LRU) Size() int
- func (m *U64LRU) Walk(callback func(key uint64, value interface{}))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DoubleKeyLRUCounter ¶
type DoubleKeyLRUCounter struct { Max int `statsd:"max-bucket"` // 目前仅统计Get扫描到的最大冲突值 MaxShortBucket int `statsd:"max-short-bucket"` // 目前仅统计GetByShortKey扫描到的最大冲突值 Size int `statsd:"size"` MaxLongBucket int `statsd:"max-long-bucket"` // 目前通过shortKey删除的含有最多的成员数值 AvgScan int `statsd:"avg-scan"` // 平均扫描次数 Hit int `statsd:"hit"` Miss int `statsd:"miss"` // contains filtered or unexported fields }
type U128LRU ¶
注意:不是线程安全的
func NewU128LRU ¶
func NewU128LRU(module string, hashSlots, capacity int, opts ...stats.OptionStatTags) *U128LRU
func NewU128LRUNoStats ¶
func (*U128LRU) GetCollisionChain ¶
func (*U128LRU) GetCounter ¶
func (m *U128LRU) GetCounter() interface{}
func (*U128LRU) SetCollisionChainDebugThreshold ¶
type U128U64DoubleKeyLRU ¶
注意:不是线程安全的
func NewU128U64DoubleKeyLRU ¶
func NewU128U64DoubleKeyLRU(module string, hashSlots, relationHashSlots, capacity int, opts ...stats.OptionStatTags) *U128U64DoubleKeyLRU
func (*U128U64DoubleKeyLRU) Add ¶
func (m *U128U64DoubleKeyLRU) Add(longKey0, longKey1, shortKey uint64, value interface{})
通过longKey进行添加
func (*U128U64DoubleKeyLRU) AddByShortKey ¶
func (m *U128U64DoubleKeyLRU) AddByShortKey(longKey0s, longKey1s []uint64, shortKey uint64, values []interface{})
通过shortKey进行添加
func (*U128U64DoubleKeyLRU) Clear ¶
func (m *U128U64DoubleKeyLRU) Clear()
func (*U128U64DoubleKeyLRU) Get ¶
func (m *U128U64DoubleKeyLRU) Get(longKey0, longKey1 uint64, peek bool) (interface{}, bool)
func (*U128U64DoubleKeyLRU) GetCollisionChain ¶
func (m *U128U64DoubleKeyLRU) GetCollisionChain() []byte
func (*U128U64DoubleKeyLRU) GetCounter ¶
func (m *U128U64DoubleKeyLRU) GetCounter() interface{}
func (*U128U64DoubleKeyLRU) ID ¶
func (m *U128U64DoubleKeyLRU) ID() string
func (*U128U64DoubleKeyLRU) KeySize ¶
func (m *U128U64DoubleKeyLRU) KeySize() int
func (*U128U64DoubleKeyLRU) NoStats ¶
func (m *U128U64DoubleKeyLRU) NoStats() *U128U64DoubleKeyLRU
func (*U128U64DoubleKeyLRU) PeekByShortKey ¶
func (m *U128U64DoubleKeyLRU) PeekByShortKey(shortKey uint64) ([]interface{}, bool)
func (*U128U64DoubleKeyLRU) Remove ¶
func (m *U128U64DoubleKeyLRU) Remove(longKey0, longKey1 uint64)
通过longKey进行删除
func (*U128U64DoubleKeyLRU) RemoveByShortKey ¶
func (m *U128U64DoubleKeyLRU) RemoveByShortKey(shortKey uint64) int
通过shortKey进行删除
func (*U128U64DoubleKeyLRU) SetCollisionChainDebugThreshold ¶
func (m *U128U64DoubleKeyLRU) SetCollisionChainDebugThreshold(t int)
func (*U128U64DoubleKeyLRU) Size ¶
func (m *U128U64DoubleKeyLRU) Size() int
func (*U128U64DoubleKeyLRU) Walk ¶
func (m *U128U64DoubleKeyLRU) Walk(callback func(longKey0, longKey1 uint64, value interface{}))
type U64DoubleKeyLRU ¶
注意:不是线程安全的
func NewU64DoubleKeyLRU ¶
func NewU64DoubleKeyLRU(module string, hashSlots, relationHashSlots, capacity int, opts ...stats.OptionStatTags) *U64DoubleKeyLRU
func (*U64DoubleKeyLRU) Add ¶
func (m *U64DoubleKeyLRU) Add(key uint64, shortKey uint64, value interface{})
通过longKey进行添加
func (*U64DoubleKeyLRU) AddByShortKey ¶
func (m *U64DoubleKeyLRU) AddByShortKey(keys []uint64, shortKey uint64, values []interface{})
通过shortKey进行添加
func (*U64DoubleKeyLRU) Clear ¶
func (m *U64DoubleKeyLRU) Clear()
func (*U64DoubleKeyLRU) Get ¶
func (m *U64DoubleKeyLRU) Get(key uint64, peek bool) (interface{}, bool)
func (*U64DoubleKeyLRU) GetCollisionChain ¶
func (m *U64DoubleKeyLRU) GetCollisionChain() []byte
func (*U64DoubleKeyLRU) GetCounter ¶
func (m *U64DoubleKeyLRU) GetCounter() interface{}
func (*U64DoubleKeyLRU) ID ¶
func (m *U64DoubleKeyLRU) ID() string
func (*U64DoubleKeyLRU) KeySize ¶
func (m *U64DoubleKeyLRU) KeySize() int
func (*U64DoubleKeyLRU) NoStats ¶
func (m *U64DoubleKeyLRU) NoStats() *U64DoubleKeyLRU
func (*U64DoubleKeyLRU) PeekByShortKey ¶
func (m *U64DoubleKeyLRU) PeekByShortKey(key uint64) ([]interface{}, bool)
func (*U64DoubleKeyLRU) RemoveByShortKey ¶
func (m *U64DoubleKeyLRU) RemoveByShortKey(key uint64) int
通过shortKey进行删除
func (*U64DoubleKeyLRU) SetCollisionChainDebugThreshold ¶
func (m *U64DoubleKeyLRU) SetCollisionChainDebugThreshold(t int)
func (*U64DoubleKeyLRU) Size ¶
func (m *U64DoubleKeyLRU) Size() int
func (*U64DoubleKeyLRU) Walk ¶
func (m *U64DoubleKeyLRU) Walk(callback func(key uint64, value interface{}))
type U64LRU ¶
注意:不是线程安全的
func NewU64LRU ¶
func NewU64LRU(module string, hashSlots, capacity int, opts ...stats.OptionStatTags) *U64LRU
func NewU64LRUNoStats ¶
func (*U64LRU) GetCollisionChain ¶
func (*U64LRU) GetCounter ¶
func (m *U64LRU) GetCounter() interface{}
func (*U64LRU) SetCollisionChainDebugThreshold ¶
Click to show internal directories.
Click to hide internal directories.