Documentation
¶
Index ¶
- func ReusableEntry() *entry
- func ReusableHashHit() *hashHit
- func ReusableHit() *hit
- type Bucket
- type Equalable
- type Hash
- func (self *Hash) Describe() string
- func (self *Hash) Each(i HashIterator) bool
- func (self *Hash) Get(k Key) (unsafe.Pointer, bool)
- func (self *Hash) GetHC(hashCode uint32, k Key, ld *LocalData) (rval unsafe.Pointer, ok bool)
- func (self *Hash) Put(k Key, v unsafe.Pointer) (rval unsafe.Pointer, ok bool)
- func (self *Hash) PutHC(hashCode uint32, k Key, v unsafe.Pointer) (rval unsafe.Pointer, ok bool)
- func (self *Hash) PutIfMissing(k Key, v unsafe.Pointer) (rval bool)
- func (self *Hash) PutIfPresent(k Key, v unsafe.Pointer, expected Equalable) (rval bool)
- func (self *Hash) Size() int
- func (self *Hash) String() string
- func (self *Hash) ToMap() map[Key]Thing
- type HashIterator
- type Key
- type ListIterator
- type LocalData
- type Thing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReusableEntry ¶
func ReusableEntry() *entry
func ReusableHashHit ¶
func ReusableHashHit() *hashHit
func ReusableHit ¶
func ReusableHit() *hit
Types ¶
type Hash ¶
type Hash struct {
// contains filtered or unexported fields
}
func (*Hash) Describe ¶
Describe returns a multi line description of the contents of the map for those of you interested in debugging it or seeing an example of how split-ordered lists work.
func (*Hash) Each ¶
func (self *Hash) Each(i HashIterator) bool
Each will run i on each key and value.
It returns true if the iteration was interrupted. This is the case when one of the HashIterator calls returned true, indicating the iteration should be stopped.
func (*Hash) GetHC ¶
GetHC returns the key with hashCode that equals k. Use this when you already have the hash code and don't want to force gotomic to calculate it again.
func (*Hash) Put ¶
Put k and v in the Hash and return the overwritten value and whether any value was overwritten.
func (*Hash) PutHC ¶
PutHC will put k and v in the Hash using hashCode and return the overwritten value and whether any value was overwritten. Use this when you already have the hash code and don't want to force gotomic to calculate it again.
func (*Hash) PutIfMissing ¶
PutIfMissing will insert v under k if k was missing from the Hash, and return whether it inserted anything.
func (*Hash) PutIfPresent ¶
PutIfMissing will insert v under k if k contains expected in the Hash, and return whether it inserted anything.
type ListIterator ¶
type ListIterator func(e entry) bool
type LocalData ¶
type LocalData struct {
// contains filtered or unexported fields
}
func InitLocalData ¶
func InitLocalData() *LocalData