X-Git-Url: https://git.mdrn.pl/pylucene.git/blobdiff_plain/a2e61f0c04805cfcb8706176758d1283c7e3a55c..aaeed5504b982cf3545252ab528713250aa33eed:/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java
diff --git a/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java b/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java
deleted file mode 100644
index 8906d9b..0000000
--- a/lucene-java-3.4.0/lucene/src/java/org/apache/lucene/search/FieldCacheImpl.java
+++ /dev/null
@@ -1,745 +0,0 @@
-package org.apache.lucene.search;
-
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.WeakHashMap;
-
-import org.apache.lucene.index.IndexReader;
-import org.apache.lucene.index.Term;
-import org.apache.lucene.index.TermDocs;
-import org.apache.lucene.index.TermEnum;
-import org.apache.lucene.util.BitVector;
-import org.apache.lucene.util.DocIdBitSet;
-import org.apache.lucene.util.OpenBitSet;
-import org.apache.lucene.util.StringHelper;
-import org.apache.lucene.util.FieldCacheSanityChecker;
-
-/**
- * Expert: The default cache implementation, storing all values in memory.
- * A WeakHashMap is used for storage.
- *
- *
Created: May 19, 2004 4:40:36 PM
- *
- * @since lucene 1.4
- */
-class FieldCacheImpl implements FieldCache {
-
- private Map,Cache> caches;
- FieldCacheImpl() {
- init();
- }
- private synchronized void init() {
- caches = new HashMap,Cache>(9);
- caches.put(Byte.TYPE, new ByteCache(this));
- caches.put(Short.TYPE, new ShortCache(this));
- caches.put(Integer.TYPE, new IntCache(this));
- caches.put(Float.TYPE, new FloatCache(this));
- caches.put(Long.TYPE, new LongCache(this));
- caches.put(Double.TYPE, new DoubleCache(this));
- caches.put(String.class, new StringCache(this));
- caches.put(StringIndex.class, new StringIndexCache(this));
- caches.put(UnValuedDocsCache.class, new UnValuedDocsCache(this));
- }
-
- public synchronized void purgeAllCaches() {
- init();
- }
-
- public synchronized void purge(IndexReader r) {
- for(Cache c : caches.values()) {
- c.purge(r);
- }
- }
-
- public synchronized CacheEntry[] getCacheEntries() {
- List result = new ArrayList(17);
- for(final Map.Entry,Cache> cacheEntry: caches.entrySet()) {
- final Cache cache = cacheEntry.getValue();
- final Class> cacheType = cacheEntry.getKey();
- synchronized(cache.readerCache) {
- for (final Map.Entry