Java org.apache.lucene.util RamUsageEstimator fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.util RamUsageEstimator fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.util RamUsageEstimator.

The text is from its open source code.

Field

intNUM_BYTES_OBJECT_REF
Number of bytes this JVM uses to represent an object reference.
intNUM_BYTES_OBJECT_HEADER
Number of bytes to represent an object header (no fields, no alignments).
intNUM_BYTES_ARRAY_HEADER
Number of bytes to represent an array header (no content, but with alignments).

Constructor

RamUsageEstimator()
No instantiation.

Method

StringhumanReadableUnits(long bytes)
Returns size in human-readable units (GB, MB, KB or bytes).
longshallowSizeOf(Object[] arr)
Returns the shallow size in bytes of the Object[] object.
longshallowSizeOf(Object obj)
Estimates a "shallow" memory usage of the given object.
longsizeOf(Long value)
Return the size of the provided Long object, returning 0 if it is cached by the JVM and its shallow size otherwise.
longsizeOf(byte[] arr)
Returns the size in bytes of the byte[] object.
longsizeOf(boolean[] arr)
Returns the size in bytes of the boolean[] object.
longsizeOf(char[] arr)
Returns the size in bytes of the char[] object.
longsizeOf(short[] arr)
Returns the size in bytes of the short[] object.
longsizeOf(int[] arr)
Returns the size in bytes of the int[] object.
longsizeOf(float[] arr)
Returns the size in bytes of the float[] object.
longsizeOf(long[] arr)
Returns the size in bytes of the long[] object.
longsizeOf(double[] arr)
Returns the size in bytes of the double[] object.
longsizeOf(String[] arr)
Returns the size in bytes of the String[] object.
longsizeOf(Query q)
Returns the size in bytes of a Query object.
longsizeOf(Accountable accountable)
Returns the size in bytes of the Accountable object, using its Accountable#ramBytesUsed() method.
longsizeOf(String s)
Returns the size in bytes of the String object.
longsizeOf(Accountable[] accountables)
Return the size of the provided array of Accountable s by summing up the shallow size of the array and the Accountable#ramBytesUsed() memory usage reported by each Accountable .