org.apache.lucene.util
Class AverageGuessMemoryModel
java.lang.Object
org.apache.lucene.util.MemoryModel
org.apache.lucene.util.AverageGuessMemoryModel
public class AverageGuessMemoryModel
- extends MemoryModel
An average, best guess, MemoryModel that should work okay on most systems.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AverageGuessMemoryModel
public AverageGuessMemoryModel()
getArraySize
public int getArraySize()
- Specified by:
getArraySize
in class MemoryModel
- Returns:
- size of array beyond contents
getClassSize
public int getClassSize()
- Specified by:
getClassSize
in class MemoryModel
- Returns:
- Class size overhead
getPrimitiveSize
public int getPrimitiveSize(Class clazz)
- Specified by:
getPrimitiveSize
in class MemoryModel
- Parameters:
clazz
- a primitive Class - bool, byte, char, short, long, float,
short, double, int
- Returns:
- the size in bytes of given primitive Class
getReferenceSize
public int getReferenceSize()
- Specified by:
getReferenceSize
in class MemoryModel
- Returns:
- size of reference
Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.