org.apache.lucene.util
Class MemoryModel
java.lang.Object
org.apache.lucene.util.MemoryModel
- Direct Known Subclasses:
- AverageGuessMemoryModel
public abstract class MemoryModel
- extends Object
Returns primitive memory sizes for estimating RAM usage.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryModel
public MemoryModel()
getArraySize
public abstract int getArraySize()
- Returns:
- size of array beyond contents
getClassSize
public abstract int getClassSize()
- Returns:
- Class size overhead
getPrimitiveSize
public abstract int getPrimitiveSize(Class<?> clazz)
- 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 abstract int getReferenceSize()
- Returns:
- size of reference
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.