private KeyspaceInfo GetKeySpaceInfo(DataBuffer keySpace) { KeyspaceInfo ret = null; _keyspaceInfoLock.Read(() => _keyspaceInfos.TryGetValue(keySpace, out ret)); return(ret); }
private void AddKeySpaceInfo <T>(DataBuffer keySpace) { if (!_allowsDrops) { return; } _keyspaceInfoLock.ReadUpgradable(() => { if (!_keyspaceInfos.ContainsKey(keySpace)) { _keyspaceInfoLock.Write(() => { _keyspaceInfos[keySpace] = KeyspaceInfo.Create <T>(); }); } }); }
private void AddKeySpaceInfoForList <T, THeader>(DataBuffer keySpace) { if (!_allowsDrops) { return; } _keyspaceInfoLock.ReadUpgradable(() => { if (!_keyspaceInfos.ContainsKey(keySpace)) { _keyspaceInfoLock.Write(() => { _keyspaceInfos[keySpace] = KeyspaceInfo.CreateForList <T, THeader>( Storage.GetAllowsMultiple(keySpace)); }); } }); }