NewShardLockMaps creates a new ShardLockMaps with default shard count. Example usage: m := NewShardLockMaps() m.Set("key", "value") if val, ok := m.Get("key"); ok { fmt.Println(val) }
()
| 50 | // fmt.Println(val) |
| 51 | // } |
| 52 | func NewShardLockMaps() ShardLockMaps { |
| 53 | return createShardLockMaps(DefaultHash(), DefaultShardCount) |
| 54 | } |
| 55 | |
| 56 | // NewShardLockMapsWithCount creates a new ShardLockMaps with custom shard count. |
| 57 | // Use this when you need to tune performance based on your workload. |