MCPcopy Create free account
hub / github.com/aceld/zinx / NewWithCustomHashAndCount

Function NewWithCustomHashAndCount

zutils/shard_lock_map.go:71–73  ·  view source on GitHub ↗

NewWithCustomHashAndCount creates a new ShardLockMaps with custom hash function and shard count. This provides maximum flexibility for performance tuning.

(hash IHash, shardCount int)

Source from the content-addressed store, hash-verified

69// NewWithCustomHashAndCount creates a new ShardLockMaps with custom hash function and shard count.
70// This provides maximum flexibility for performance tuning.
71func NewWithCustomHashAndCount(hash IHash, shardCount int) ShardLockMaps {
72 return createShardLockMaps(hash, shardCount)
73}
74
75// GetShard returns shard under given key
76func (slm ShardLockMaps) GetShard(key string) *SingleShardMap {

Callers

nothing calls this directly

Calls 1

createShardLockMapsFunction · 0.85

Tested by

no test coverage detected