Searched defs:cache (Results 1 - 25 of 41) sorted by relevance

12

/lucene-3.6.0/lucene/contrib/facet/src/java/org/apache/lucene/facet/search/cache/
H A DCategoryListCache.java1 package org.apache.lucene.facet.search.cache;
H A DCategoryListData.java1 package org.apache.lucene.facet.search.cache;
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/analysis/
H A DCachingTokenFilter.java37 private List<AttributeSource.State> cache = null; field in class:CachingTokenFilter
47 if (cache == null) {
48 // fill cache lazily
49 cache = new LinkedList<AttributeSource.State>();
51 iterator = cache.iterator();
55 // the cache is exhausted, return false
72 if(cache != null) {
73 iterator = cache.iterator();
79 cache.add(captureState());
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/function/
H A DByteFieldSource.java70 public DocValues getCachedFieldValues (FieldCache cache, String field, IndexReader reader) throws IOException { argument
71 final byte[] arr = cache.getBytes(reader, field, parser);
H A DFloatFieldSource.java70 public DocValues getCachedFieldValues (FieldCache cache, String field, IndexReader reader) throws IOException { argument
71 final float[] arr = cache.getFloats(reader, field, parser);
H A DIntFieldSource.java70 public DocValues getCachedFieldValues (FieldCache cache, String field, IndexReader reader) throws IOException { argument
71 final int[] arr = cache.getInts(reader, field, parser);
H A DShortFieldSource.java70 public DocValues getCachedFieldValues (FieldCache cache, String field, IndexReader reader) throws IOException { argument
71 final short[] arr = cache.getShorts(reader, field, parser);
H A DFieldCacheSource.java70 * @param cache FieldCache so that values of a field are loaded once per reader (RAM allowing)
74 public abstract DocValues getCachedFieldValues(FieldCache cache, String field, IndexReader reader) throws IOException; argument
97 * Check if equals to another {@link FieldCacheSource}, already knowing that cache and field are equal.
104 * and the cache (those are taken care of elsewhere).
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/util/
H A DSimpleStringInterner.java21 * Simple lockless and memory barrier free String intern cache that is guaranteed
40 private final Entry[] cache; field in class:SimpleStringInterner
48 cache = new Entry[Math.max(1,BitUtil.nextHighestPowerOfTwo(tableSize))];
57 int slot = h & (cache.length-1);
59 Entry first = this.cache[slot];
76 // insertion-order cache: add new entry at head
78 this.cache[slot] = new Entry(s, h, first);
H A DVirtualMethod.java40 * <p>This enforces the singleton status of these objects, as the maintenance of the cache would be too costly else.
66 private final WeakIdentityMap<Class<? extends C>, Integer> cache = WeakIdentityMap.newConcurrentHashMap(); field in class:VirtualMethod
95 Integer distance = cache.get(subclazz);
98 cache.put(subclazz, distance = Integer.valueOf(reflectImplementationDistance(subclazz)));
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/
H A DExtendedQuery.java24 /** Should this query be cached in the query cache or filter cache. */
27 public void setCache(boolean cache); argument
H A DLuceneQueryOptimizer.java38 private LinkedHashMap cache; // an LRU cache of QueryFilter field in class:LuceneQueryOptimizer
44 * @param cacheSize the number of QueryFilters to cache
48 this.cache = new LinkedHashMap(cacheSize, 0.75f, true) {
51 return size() > cacheSize; // limit size of cache
96 synchronized (cache) { // check cache
97 filter = (Filter)cache.get(filterQuery);
101 synchronized (cache) {
102 cache
[all...]
H A DExtendedQueryBase.java24 private boolean cache = true; field in class:ExtendedQueryBase
27 public void setCache(boolean cache) { argument
28 this.cache = cache;
32 return cache;
53 if (!cache) {
54 sb.append("{!cache=false");
59 sb.append("{!cache=sep");
/lucene-3.6.0/solr/core/src/java/org/apache/solr/search/function/
H A DFieldCacheSource.java30 protected FieldCache cache = FieldCache.DEFAULT; field in class:FieldCacheSource
37 return cache;
50 && this.cache == other.cache;
55 return cache.hashCode() + field.hashCode();
/lucene-3.6.0/solr/core/src/java/org/apache/solr/servlet/cache/
H A DMethod.java18 package org.apache.solr.servlet.cache;
/lucene-3.6.0/lucene/core/src/java/org/apache/lucene/search/
H A DCachingSpanFilter.java31 * A transient Filter cache (package private because of test)
33 private final CachingWrapperFilter.FilterCache<SpanFilterResult> cache; field in class:CachingSpanFilter
36 * New deletions always result in a cache miss, by default
38 * @param filter Filter to cache results of
45 * @param filter Filter to cache results of
53 this.cache = new CachingWrapperFilter.FilterCache<SpanFilterResult>(deletesMode) {
75 SpanFilterResult result = cache.get(reader, coreKey, delCoreKey);
84 cache.put(coreKey, delCoreKey, result);
H A DFilterManager.java31 * This class makes it possible to cache Filters even when using RMI, as it
32 * keeps the cache on the searcher side of the RMI connection.
35 * filter provides a proper hashCode(), as that is used as the key in the cache.
37 * The cache is periodically cleaned up from a separate thread to ensure the
38 * cache doesn't exceed the maximum size.
41 * use {@link CachingWrapperFilter} if you wish to cache
49 /** The default maximum number of Filters in the cache */
51 /** The default frequency of cache cleanup */
54 /** The cache itself */
55 protected Map<Integer,FilterItem> cache; field in class:FilterManager
[all...]
/lucene-3.6.0/solr/contrib/dataimporthandler/src/java/org/apache/solr/handler/dataimport/
H A DMockDataSource.java38 private static Map<String, Object> cache = new HashMap<String, Object>(); field in class:MockDataSource
42 cache.put(query, iter);
47 cache.put(query, collection);
51 cache.clear();
60 Object data = cache.get(query);
67 cache.clear();
H A DTemplateString.java41 private Map<String, TemplateString> cache; field in class:TemplateString
44 cache = new ConcurrentHashMap<String, TemplateString>();
70 TemplateString ts = cache.get(string);
73 cache.put(string, ts);
/lucene-3.6.0/lucene/contrib/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/cl2o/
H A DCl2oTaxonomyWriterCache.java25 * called cache, it maintains in memory all the mappings from category to
33 private CompactLabelToOrdinal cache; field in class:Cl2oTaxonomyWriterCache
36 this.cache = new CompactLabelToOrdinal(initialCapcity, loadFactor, numHashArrays);
40 cache=null;
44 // This cache is unlimited, so we always have room for remembering more:
49 return cache.getOrdinal(categoryPath);
56 return cache.getOrdinal(categoryPath, length);
60 cache.addLabel(categoryPath, ordinal);
61 // Tell the caller we didn't clear part of the cache, so it doesn't
67 cache
[all...]
/lucene-3.6.0/lucene/contrib/facet/src/java/org/apache/lucene/facet/taxonomy/writercache/lru/
H A DLruTaxonomyWriterCache.java32 private NameIntCacheLRU cache; field in class:LruTaxonomyWriterCache
52 this.cache = new NameHashIntCacheLRU(cacheSize);
54 this.cache = new NameIntCacheLRU(cacheSize);
59 return n<=(cache.getMaxSize()-cache.getSize());
63 cache.clear();
64 cache=null;
68 Integer res = cache.get(categoryPath);
82 // object). A better implementation of the cache would not use Java's
85 Integer res = cache
[all...]
H A DNameIntCacheLRU.java26 * An an LRU cache of mapping from name to int.
27 * Used to cache Ordinals of category paths.
35 private HashMap<Object, Integer> cache; field in class:NameIntCacheLRU
50 return cache.size();
55 cache = new LinkedHashMap<Object, Integer>(1000,(float)0.7,true); //for LRU
57 cache = new HashMap<Object, Integer>(1000,(float)0.7); //no need for LRU
62 Integer res = cache.get(key(name));
93 * Add a new value to cache.
94 * Return true if cache became full and some room need to be made.
97 cache
[all...]
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/search/function/
H A DJustCompileSearchSpans.java66 public DocValues getCachedFieldValues(FieldCache cache, String field, argument
/lucene-3.6.0/lucene/core/src/test/org/apache/lucene/util/
H A DTestDoubleBarrelLRUCache.java24 private void testCache(DoubleBarrelLRUCache<CloneableInteger,Object> cache, int n) throws Exception { argument
28 cache.put(new CloneableInteger(i), dummy);
31 // access every 2nd item in cache
33 assertNotNull(cache.get(new CloneableInteger(i)));
36 // add n/2 elements to cache, the ones that weren't
39 cache.put(new CloneableInteger(i), dummy);
42 // access every 4th item in cache
44 assertNotNull(cache.get(new CloneableInteger(i)));
47 // add 3/4n elements to cache, the ones that weren't
50 cache
[all...]
/lucene-3.6.0/lucene/backwards/src/test/org/apache/lucene/search/function/
H A DJustCompileSearchSpans.java66 public DocValues getCachedFieldValues(FieldCache cache, String field, argument

Completed in 412 milliseconds

12