Exemplo n.º 1
0
        public void Add(string storeName,IIndexStore store, RedBlackNodeReference node)
        {
            IndexStoreInformation ni = new IndexStoreInformation(storeName, store, node);
            _nodeInfo.Add(ni);

            if (_nodeInfo.Count > _nodeInfoMaxCount)
                _nodeInfoMaxCount = _nodeInfo.Count;

            _indexInformationSize += (int)ni.IndexInMemorySize;

        }
Exemplo n.º 2
0
        public void Add(string storeName, IIndexStore store, RedBlackNodeReference node)
        {
            IndexStoreInformation ni = new IndexStoreInformation(storeName, store, node);

            _nodeInfo.Add(ni);

            if (_nodeInfo.Count > _nodeInfoMaxCount)
            {
                _nodeInfoMaxCount = _nodeInfo.Count;
            }

            _indexInformationSize += (int)ni.IndexInMemorySize;
        }
Exemplo n.º 3
0
        public virtual void AddToIndex(object key, object value)
        {
            Hashtable             attributeValues = value as Hashtable;
            IDictionaryEnumerator valuesDic       = attributeValues.GetEnumerator();
            RedBlackNodeReference keyNode         = null;

            while (valuesDic.MoveNext())
            {
                string      indexKey  = (string)valuesDic.Key;
                string      storeName = indexKey;
                IIndexStore store     = _indexTable[indexKey] as IIndexStore;
                keyNode = null;

                if (store != null)
                {
                    long   prev = store.IndexInMemorySize;
                    object val  = valuesDic.Value;

                    if (val != null)
                    {
                        keyNode = (RedBlackNodeReference)store.Add(val, key);
                    }

                    _attributeIndexSize += store.IndexInMemorySize - prev;
                }

                storeName = Common.Util.StringPool.PoolString(storeName);

                IndexInformation info;

                if (_keyIndexTable.Contains(key))
                {
                    info = _keyIndexTable[key] as IndexInformation;
                }
                else
                {
                    info = new IndexInformation();
                }

                long prevSize = info.IndexInMemorySize;

                info.Add(storeName, store, keyNode);
                _keyIndexTable[key] = info;

                this._keyIndexInformationSize += info.IndexInMemorySize - prevSize;
                if (_keyIndexTable.Count > _keyIndexTableMaxCount)
                {
                    _keyIndexTableMaxCount = _keyIndexTable.Count;
                }
            }
        }
Exemplo n.º 4
0
 public IndexStoreInformation(string storeName,IIndexStore store, RedBlackNodeReference node)
 {
     _rbnodes = node;
     _store = store;
     _storeName = storeName;
 }
Exemplo n.º 5
0
 public IndexStoreInformation()
 {
     _rbnodes = new RedBlackNodeReference();
 }
Exemplo n.º 6
0
 public IndexStoreInformation(string storeName, IIndexStore store, RedBlackNodeReference node)
 {
     _rbnodes   = node;
     _store     = store;
     _storeName = storeName;
 }
Exemplo n.º 7
0
 public IndexStoreInformation()
 {
     _rbnodes = new RedBlackNodeReference();
 }
Exemplo n.º 8
0
		/// <summary>
		/// Default constructor.
		/// </summary>
		public RedBlackNode()
		{
			Color = RED;
            Data = new Hashtable();
            _rbReference = new RedBlackNodeReference(this);
		}