org.apache.lucene.util
Class AverageGuessMemoryModel

java.lang.Object
  extended by org.apache.lucene.util.MemoryModel
      extended by org.apache.lucene.util.AverageGuessMemoryModel

public class AverageGuessMemoryModel
extends MemoryModel

An average, best guess, MemoryModel that should work okay on most systems.


Constructor Summary
AverageGuessMemoryModel()
           
 
Method Summary
 int getArraySize()
           
 int getClassSize()
           
 int getPrimitiveSize(Class clazz)
           
 int getReferenceSize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AverageGuessMemoryModel

public AverageGuessMemoryModel()
Method Detail

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.