コード例 #1
0
        private KeyspaceInfo GetKeySpaceInfo(DataBuffer keySpace)
        {
            KeyspaceInfo ret = null;

            _keyspaceInfoLock.Read(() =>
                                   _keyspaceInfos.TryGetValue(keySpace, out ret));
            return(ret);
        }
コード例 #2
0
 private void AddKeySpaceInfo <T>(DataBuffer keySpace)
 {
     if (!_allowsDrops)
     {
         return;
     }
     _keyspaceInfoLock.ReadUpgradable(() =>
     {
         if (!_keyspaceInfos.ContainsKey(keySpace))
         {
             _keyspaceInfoLock.Write(() =>
             {
                 _keyspaceInfos[keySpace] = KeyspaceInfo.Create <T>();
             });
         }
     });
 }
コード例 #3
0
 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));
             });
         }
     });
 }