Documentation ¶
Index ¶
- type HashMap
- type Iterator
- type ShardedHashMap
- func (s *ShardedHashMap) Close()
- func (s *ShardedHashMap) Del(key keyType) (valType, bool)
- func (s *ShardedHashMap) Get(key keyType) (valType, bool)
- func (s *ShardedHashMap) Len() int
- func (s *ShardedHashMap) Put(key keyType, val valType) (valType, bool)
- func (s *ShardedHashMap) Range(it Iterator)
- func (s *ShardedHashMap) Stats()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashMap ¶
type HashMap struct {
// contains filtered or unexported fields
}
HashMap represents a closed hashing hashtable implementation
func NewHashMap ¶
NewHashMap returns a new HashMap instantiated with the specified size or the defaultMapSize, whichever is larger
func (*HashMap) Close ¶
func (m *HashMap) Close()
Close closes and frees the current hashmap. Calling any method on the HashMap after this will most likely result in a panic
func (*HashMap) Del ¶
Del removes a value for a given key and returns the deleted value, or false Del can be considered the exported version of the delete call
func (*HashMap) Get ¶
Get returns a value for a given key, or returns false if none could be found Get can be considered the exported version of the lookup call
func (*HashMap) PercentFull ¶
PercentFull returns the current load factor of the HashMap
type Iterator ¶
type Iterator func(key keyType, value valType) bool
Iterator is an iterator function type
type ShardedHashMap ¶
type ShardedHashMap struct {
// contains filtered or unexported fields
}
func NewShardedHashMap ¶
func NewShardedHashMap(size uint) *ShardedHashMap
NewShardedHashMap returns a new hashMap instantiated with the specified size or the defaultMapSize, whichever is larger
func (*ShardedHashMap) Close ¶
func (s *ShardedHashMap) Close()
func (*ShardedHashMap) Del ¶
func (s *ShardedHashMap) Del(key keyType) (valType, bool)
func (*ShardedHashMap) Get ¶
func (s *ShardedHashMap) Get(key keyType) (valType, bool)
func (*ShardedHashMap) Len ¶
func (s *ShardedHashMap) Len() int
func (*ShardedHashMap) Put ¶
func (s *ShardedHashMap) Put(key keyType, val valType) (valType, bool)
func (*ShardedHashMap) Range ¶
func (s *ShardedHashMap) Range(it Iterator)
func (*ShardedHashMap) Stats ¶
func (s *ShardedHashMap) Stats()