示例#1
0
        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;
                }
            }
        }
示例#2
0
        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);
                }
            }
        }
示例#3
0
        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);                   
                }
            }
        }
示例#4
0
        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;
                }
            }
        }