FileDocCategorySizeDatePackage
FieldCacheImpl.javaAPI DocApache Lucene 2.2.016303Sat Jun 16 22:20:34 BST 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 544546 2007-06-05 16:29:35Z doronc $

Fields Summary
private static final ByteParser
BYTE_PARSER
private static final ShortParser
SHORT_PARSER
private static final IntParser
INT_PARSER
private static final FloatParser
FLOAT_PARSER
Cache
bytesCache
Cache
shortsCache
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 byte[]getBytes(org.apache.lucene.index.IndexReader reader, java.lang.String field)


  // inherit javadocs
           
    return getBytes(reader, field, BYTE_PARSER);
  
public byte[]getBytes(org.apache.lucene.index.IndexReader reader, java.lang.String field, ByteParser parser)

    return (byte[]) bytesCache.get(reader, new Entry(field, parser));
  
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 short[]getShorts(org.apache.lucene.index.IndexReader reader, java.lang.String field)

  
  // inherit javadocs
           
    return getShorts(reader, field, SHORT_PARSER);
  
public short[]getShorts(org.apache.lucene.index.IndexReader reader, java.lang.String field, ShortParser parser)

    return (short[]) shortsCache.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);