public void testArray()
        {
            LocalCache cache = new LocalCache();

            cache.Clear();

            cache.AddIndex(IdentityExtractor.Instance, false, null);
            DoPutALL doDoPutAll = new DoPutALL(cache, "array");

            lock (doDoPutAll.m_myLock)
            {
                Thread thread = new Thread(new ThreadStart(doDoPutAll.Run));
                thread.Start();
                Thread.Sleep(2222);

                ArrayList qname = new ArrayList();
                qname.Add("test");
                IFilter filter = new ContainsAnyFilter(IdentityExtractor.Instance, (ICollection)qname);

                for (int i = 0; i < 50000; i++)
                {
                    object[] result = cache.GetEntries(filter);
                    Assert.AreEqual(result.Length, cache.Count);
                }

                // signal the PutAll thread to stop
                Monitor.Wait(doDoPutAll.m_myLock);
                thread.Join();
            }
        }
 /// <summary>
 /// Add an index to this IQueryCache.
 /// </summary>
 /// <remarks>
 /// This allows to correlate values stored in this
 /// <i>indexed cache</i> (or attributes of those values) to the
 /// corresponding keys in the indexed dictionary and increase the
 /// performance of <b>GetKeys</b> and <b>GetEntries</b> methods.
 /// </remarks>
 /// <param name="extractor">
 /// The <see cref="IValueExtractor"/> object that is used to extract
 /// an indexable object from a value stored in the indexed
 /// cache. Must not be <c>null</c>.
 /// </param>
 /// <param name="isOrdered">
 /// <b>true</b> if the contents of the indexed information should be
 /// ordered; <b>false</b> otherwise.
 /// </param>
 /// <param name="comparer">
 /// The <b>IComparer</b> object which imposes an ordering on entries
 /// in the indexed cache; or <c>null</c> if the entries' values
 /// natural ordering should be used.
 /// </param>
 public virtual void AddIndex(IValueExtractor extractor, bool isOrdered, IComparer comparer)
 {
     LocalCache.AddIndex(extractor, isOrdered, comparer);
 }