public virtual void RemoveFromIndex(object key, object value) { Hashtable attributeValues = value as Hashtable; IDictionaryEnumerator valuesDic = attributeValues.GetEnumerator(); while (valuesDic.MoveNext()) { string indexKey = (string)valuesDic.Key; if (_indexTable.Contains(indexKey)) { IIndexStore store = _indexTable[indexKey] as IIndexStore; object val = valuesDic.Value; long prev = store.IndexInMemorySize; if (val != null) { store.Remove(val, key); } else { store.Remove("null", key); } if (store.Count == 0) { String storeDataType = ((RBStore)store).StoreDataType; _indexTable[indexKey] = new RBStore(_cacheName, storeDataType); } _attributeIndexSize += store.IndexInMemorySize - prev; } } }
public virtual void Initialize(ArrayList attribList) { IIndexStore store = null; if (attribList != null && attribList.Count > 0) { IEnumerator e = attribList.GetEnumerator(); while (e.MoveNext()) { string attribName = e.Current.ToString(); String storeDataType = String.Empty; if (this._typeMap != null) { storeDataType = _typeMap.GetAttributeType(this.TypeName, attribName); } store = new RBStore(_cacheName, storeDataType); _indexTable.Add(attribName, store); } } }
public virtual void Initialize(ArrayList attribList) { IIndexStore store = null; if (attribList != null && attribList.Count > 0) { IEnumerator e = attribList.GetEnumerator(); while (e.MoveNext()) { string attribName = e.Current.ToString(); String storeDataType = String.Empty; if (this._typeMap != null) storeDataType = _typeMap.GetAttributeType(this.TypeName, attribName); store = new RBStore(_cacheName, storeDataType); _indexTable.Add(attribName, store); } } }
public virtual void RemoveFromIndex(object key, object value) { Hashtable attributeValues = value as Hashtable; IDictionaryEnumerator valuesDic = attributeValues.GetEnumerator(); while (valuesDic.MoveNext()) { string indexKey = (string)valuesDic.Key; if (_indexTable.Contains(indexKey)) { IIndexStore store = _indexTable[indexKey] as IIndexStore; object val = valuesDic.Value; long prev = store.IndexInMemorySize; if (val != null) store.Remove(val, key); else store.Remove("null", key); if (store.Count == 0) { String storeDataType = ((RBStore)store).StoreDataType; _indexTable[indexKey] = new RBStore(_cacheName, storeDataType); } _attributeIndexSize += store.IndexInMemorySize - prev; } } }