Пример #1
0
        public MainNode <K, V> removed(K k, ConcurrentTrieDictionary <K, V> ct)
        {
            ListMap <K, V> updmap = listmap.remove(k);

            if (updmap.size() > 1)
            {
                return(new LNode <K, V>(updmap));
            }
            else
            {
                updmap.iterator().MoveNext();
                KeyValuePair <K, V> kv = updmap.iterator().Current;
                // create it tombed so that it gets compressed on subsequent
                // accesses
                return(new TNode <K, V>(kv.Key, kv.Value, ct.computeHash(kv.Key)));
            }
        }
Пример #2
0
 public override int cachedSize(Object ct)
 {
     return(listmap.size());
 }