FileDocCategorySizeDatePackage
FieldCacheImpl.javaAPI DocApache Lucene 2.1.013481Wed Feb 14 10:46:40 GMT 2007org.apache.lucene.search

FieldCacheImpl

public class FieldCacheImpl extends Object implements FieldCache
Expert: The default cache implementation, storing all values in memory. A WeakHashMap is used for storage.

Created: May 19, 2004 4:40:36 PM

author
Tim Jones (Nacimiento Software)
since
lucene 1.4
version
$Id: FieldCacheImpl.java 488908 2006-12-20 03:47:09Z yonik $

Fields Summary
private static final IntParser
INT_PARSER
private static final FloatParser
FLOAT_PARSER
Cache
intsCache
Cache
floatsCache
Cache
stringsCache
Cache
stringsIndexCache
Cache
autoCache
Cache
customCache
Constructors Summary
Methods Summary
public java.lang.ObjectgetAuto(org.apache.lucene.index.IndexReader reader, java.lang.String field)
removed for java 1.3 compatibility protected static final Object pFloats = Pattern.compile ("[0-9+\\-\\.eEfFdD]+");


             
                    

             
                  

	// inherit javadocs
          
    return autoCache.get(reader, field);
  
public java.lang.Comparable[]getCustom(org.apache.lucene.index.IndexReader reader, java.lang.String field, org.apache.lucene.search.SortComparator comparator)


  // inherit javadocs
       
          
    return (Comparable[]) customCache.get(reader, new Entry(field, comparator));
  
public float[]getFloats(org.apache.lucene.index.IndexReader reader, java.lang.String field)


  // inherit javadocs
        
      
    return getFloats(reader, field, FLOAT_PARSER);
  
public float[]getFloats(org.apache.lucene.index.IndexReader reader, java.lang.String field, FloatParser parser)

    return (float[]) floatsCache.get(reader, new Entry(field, parser));
  
public int[]getInts(org.apache.lucene.index.IndexReader reader, java.lang.String field)


  // inherit javadocs
           
    return getInts(reader, field, INT_PARSER);
  
public int[]getInts(org.apache.lucene.index.IndexReader reader, java.lang.String field, IntParser parser)

    return (int[]) intsCache.get(reader, new Entry(field, parser));
  
public StringIndexgetStringIndex(org.apache.lucene.index.IndexReader reader, java.lang.String field)


  // inherit javadocs
       
        
    return (StringIndex) stringsIndexCache.get(reader, field);
  
public java.lang.String[]getStrings(org.apache.lucene.index.IndexReader reader, java.lang.String field)


  // inherit javadocs
       
        
    return (String[]) stringsCache.get(reader, field);