MCPcopy
hub / github.com/aceld/zinx / MSet

Method MSet

zutils/shard_lock_map.go:122–129  ·  view source on GitHub ↗

MSet Sets the given value under the specified key.

(data map[string]interface{})

Source from the content-addressed store, hash-verified

120
121// MSet Sets the given value under the specified key.
122func (slm ShardLockMaps) MSet(data map[string]interface{}) {
123 for key, value := range data {
124 shard := slm.GetShard(key)
125 shard.Lock()
126 shard.items[key] = value
127 shard.Unlock()
128 }
129}
130
131// Has Looks up an item under specified key
132func (slm ShardLockMaps) Has(key string) bool {

Callers 1

TestSetFunction · 0.95

Calls 1

GetShardMethod · 0.95

Tested by 1

TestSetFunction · 0.76