Documentation
¶
Index ¶
- Constants
- func BKDRHash(str string) int32
- func Gen_ID(str string) int32
- func GetCrc16(pdata []byte) (fcs uint16)
- func MurmurHash3_32(key []byte, seed uint32) uint32
- func MurmurHash64A(key []byte, seed uint64) uint64
- func WJhash(h int32) int32
- type CStrKey
- type ConcurrentHashMap
- func (self *ConcurrentHashMap) Get(key KeyFace) (value interface{}, err error)
- func (self *ConcurrentHashMap) Init(initialCapacity int32, loadFactor float64, concurrencyLevel int32)
- func (self *ConcurrentHashMap) Len() int
- func (self *ConcurrentHashMap) NewConcurrentHashMapIterator() Iterator
- func (self *ConcurrentHashMap) Put(key KeyFace, value interface{}) (old_value interface{}, err error)
- func (self *ConcurrentHashMap) Remove(key KeyFace) (value interface{}, err error)
- func (self *ConcurrentHashMap) Size() int
- type ConcurrentHashMapIterator
- type ConcurrentSkipList
- func (self *ConcurrentSkipList) Clear()
- func (self *ConcurrentSkipList) Get(key KeyFace) (value interface{}, err error)
- func (self *ConcurrentSkipList) GetFirst() (entry *Entry)
- func (self *ConcurrentSkipList) GetLast() (entry *Entry)
- func (self *ConcurrentSkipList) GetNext(key KeyFace) (value interface{}, err error)
- func (self *ConcurrentSkipList) GetPrev(key KeyFace) (value interface{}, err error)
- func (self *ConcurrentSkipList) Init()
- func (self *ConcurrentSkipList) InitWithLevel(lv int)
- func (self *ConcurrentSkipList) Len() int32
- func (self *ConcurrentSkipList) Level() int
- func (self *ConcurrentSkipList) NewConnSkipListIterator() Iterator
- func (self *ConcurrentSkipList) Put(key KeyFace, value interface{}) (old_value interface{}, err error)
- func (self *ConcurrentSkipList) Remove(key KeyFace) (value interface{}, err error)
- func (self *ConcurrentSkipList) Seek(key KeyFace) Iterator
- func (self *ConcurrentSkipList) UnsafePut(key KeyFace, value interface{}) (old_value interface{}, err error)
- func (self *ConcurrentSkipList) UnsafeRemove(key KeyFace) (value interface{}, err error)
- type ConnSkipListIterator
- type Entry
- type Float32Key
- type Int32Key
- type Int64Key
- type Iterator
- type KeyFace
- type Mutex
- type Random
- type Segment
- func (self *Segment) GetCount() int
- func (self *Segment) SegGet(key KeyFace, hashv int32) (value interface{}, err error)
- func (self *Segment) SegPut(key KeyFace, hashv int32, value interface{}) (old_value interface{}, err error)
- func (self *Segment) SegRemove(key KeyFace, hashv int32) (old_value interface{}, err error)
- type Str16Key
- type Str64Key
- type StrKey
Constants ¶
View Source
const ( DEFAULT_INITIAL_CAPACITY = 16 DEFAULT_LOAD_FACTOR = 0.75 DEFAULT_CONCURRENCY_LEVEL = 16 MAXIMUM_CAPACITY = 1 << 30 MAX_SEGMENTS = 1 << 16 RETRIES_BEFORE_LOCK = 2 )
View Source
const ( MAX_LEVEL = 12 //for random M uint32 = 2147483647 A uint64 = 16807 )
Variables ¶
This section is empty.
Functions ¶
func MurmurHash3_32 ¶
Types ¶
type ConcurrentHashMap ¶
type ConcurrentHashMap struct {
Segments []*Segment
// contains filtered or unexported fields
}
func NewConcurrentHashMap ¶
func NewConcurrentHashMap(initialCapacity int32) *ConcurrentHashMap
func (*ConcurrentHashMap) Get ¶
func (self *ConcurrentHashMap) Get(key KeyFace) (value interface{}, err error)
func (*ConcurrentHashMap) Init ¶
func (self *ConcurrentHashMap) Init(initialCapacity int32, loadFactor float64, concurrencyLevel int32)
func (*ConcurrentHashMap) Len ¶
func (self *ConcurrentHashMap) Len() int
func (*ConcurrentHashMap) NewConcurrentHashMapIterator ¶
func (self *ConcurrentHashMap) NewConcurrentHashMapIterator() Iterator
func (*ConcurrentHashMap) Put ¶
func (self *ConcurrentHashMap) Put(key KeyFace, value interface{}) (old_value interface{}, err error)
func (*ConcurrentHashMap) Remove ¶
func (self *ConcurrentHashMap) Remove(key KeyFace) (value interface{}, err error)
func (*ConcurrentHashMap) Size ¶
func (self *ConcurrentHashMap) Size() int
type ConcurrentHashMapIterator ¶
type ConcurrentHashMapIterator struct {
// contains filtered or unexported fields
}
func (*ConcurrentHashMapIterator) HasNext ¶
func (self *ConcurrentHashMapIterator) HasNext() bool
func (*ConcurrentHashMapIterator) Next ¶
func (self *ConcurrentHashMapIterator) Next() *Entry
type ConcurrentSkipList ¶
type ConcurrentSkipList struct {
// contains filtered or unexported fields
}
func NewConcurrentSkipList ¶
func NewConcurrentSkipList() *ConcurrentSkipList
func (*ConcurrentSkipList) Clear ¶
func (self *ConcurrentSkipList) Clear()
func (*ConcurrentSkipList) Get ¶
func (self *ConcurrentSkipList) Get(key KeyFace) (value interface{}, err error)
func (*ConcurrentSkipList) GetFirst ¶
func (self *ConcurrentSkipList) GetFirst() (entry *Entry)
func (*ConcurrentSkipList) GetLast ¶
func (self *ConcurrentSkipList) GetLast() (entry *Entry)
func (*ConcurrentSkipList) GetNext ¶
func (self *ConcurrentSkipList) GetNext(key KeyFace) (value interface{}, err error)
func (*ConcurrentSkipList) GetPrev ¶
func (self *ConcurrentSkipList) GetPrev(key KeyFace) (value interface{}, err error)
func (*ConcurrentSkipList) Init ¶
func (self *ConcurrentSkipList) Init()
func (*ConcurrentSkipList) InitWithLevel ¶
func (self *ConcurrentSkipList) InitWithLevel(lv int)
func (*ConcurrentSkipList) Len ¶
func (self *ConcurrentSkipList) Len() int32
func (*ConcurrentSkipList) Level ¶
func (self *ConcurrentSkipList) Level() int
func (*ConcurrentSkipList) NewConnSkipListIterator ¶
func (self *ConcurrentSkipList) NewConnSkipListIterator() Iterator
func (*ConcurrentSkipList) Put ¶
func (self *ConcurrentSkipList) Put(key KeyFace, value interface{}) (old_value interface{}, err error)
func (*ConcurrentSkipList) Remove ¶
func (self *ConcurrentSkipList) Remove(key KeyFace) (value interface{}, err error)
func (*ConcurrentSkipList) Seek ¶
func (self *ConcurrentSkipList) Seek(key KeyFace) Iterator
func (*ConcurrentSkipList) UnsafePut ¶
func (self *ConcurrentSkipList) UnsafePut(key KeyFace, value interface{}) (old_value interface{}, err error)
func (*ConcurrentSkipList) UnsafeRemove ¶
func (self *ConcurrentSkipList) UnsafeRemove(key KeyFace) (value interface{}, err error)
type ConnSkipListIterator ¶
type ConnSkipListIterator struct {
// contains filtered or unexported fields
}
func (*ConnSkipListIterator) HasNext ¶
func (self *ConnSkipListIterator) HasNext() bool
func (*ConnSkipListIterator) Next ¶
func (self *ConnSkipListIterator) Next() (entry *Entry)
type Float32Key ¶
type Float32Key struct {
// contains filtered or unexported fields
}
float32key
func NewFloat32Key ¶
func NewFloat32Key(k float32) *Float32Key
func (*Float32Key) Equals ¶
func (self *Float32Key) Equals(o interface{}) bool
func (*Float32Key) GetValue ¶
func (self *Float32Key) GetValue() float32
func (*Float32Key) HashCode ¶
func (self *Float32Key) HashCode() uint64
func (*Float32Key) Init ¶
func (self *Float32Key) Init(k float32)
func (*Float32Key) Less ¶
func (self *Float32Key) Less(o interface{}) bool
type Int32Key ¶
type Int32Key struct {
// contains filtered or unexported fields
}
int32key
func NewInt32Key ¶
type Int64Key ¶
type Int64Key struct {
// contains filtered or unexported fields
}
int64key
func NewInt64Key ¶
type Segment ¶
type Segment struct {
Elements []*ConcurrentSkipList
// contains filtered or unexported fields
}
func NewSegment ¶
type Str16Key ¶
type Str16Key struct {
// contains filtered or unexported fields
}
func NewStr16Key ¶
type Str64Key ¶
type Str64Key struct {
// contains filtered or unexported fields
}
func NewStr64Key ¶
Click to show internal directories.
Click to hide internal directories.