Class RamUsageUtil
- java.lang.Object
-
- org.apache.lucene.codecs.uniformsplit.RamUsageUtil
-
public class RamUsageUtil extends java.lang.ObjectUtility methods to estimate the RAM usage of objects. It relies onRamUsageEstimator.
-
-
Field Summary
Fields Modifier and Type Field Description private static longBYTES_REF_BASE_RAM_USAGEprivate static longBYTES_REF_BUILDER_BASE_RAM_USAGEprivate static longHASH_MAP_BASE_RAM_USAGEprivate static longHASH_MAP_ENTRY_BASE_RAM_USAGEprivate static longUNMODIFIABLE_ARRAY_LIST_BASE_RAM_USAGE
-
Constructor Summary
Constructors Constructor Description RamUsageUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static longramBytesUsed(TermState termState)static longramBytesUsed(BytesRef bytesRef)static longramBytesUsed(BytesRefBuilder bytesRefBuilder)static longramBytesUsedByByteArrayOfLength(int length)static longramBytesUsedByHashMapOfSize(int size)static longramBytesUsedByObjectArrayOfLength(int length)static longramBytesUsedByUnmodifiableArrayListOfSize(int size)
-
-
-
Field Detail
-
BYTES_REF_BASE_RAM_USAGE
private static final long BYTES_REF_BASE_RAM_USAGE
-
BYTES_REF_BUILDER_BASE_RAM_USAGE
private static final long BYTES_REF_BUILDER_BASE_RAM_USAGE
-
HASH_MAP_BASE_RAM_USAGE
private static final long HASH_MAP_BASE_RAM_USAGE
-
HASH_MAP_ENTRY_BASE_RAM_USAGE
private static final long HASH_MAP_ENTRY_BASE_RAM_USAGE
-
UNMODIFIABLE_ARRAY_LIST_BASE_RAM_USAGE
private static final long UNMODIFIABLE_ARRAY_LIST_BASE_RAM_USAGE
-
-
Method Detail
-
ramBytesUsed
public static long ramBytesUsed(BytesRef bytesRef)
-
ramBytesUsed
public static long ramBytesUsed(BytesRefBuilder bytesRefBuilder)
-
ramBytesUsed
public static long ramBytesUsed(TermState termState)
-
ramBytesUsedByByteArrayOfLength
public static long ramBytesUsedByByteArrayOfLength(int length)
-
ramBytesUsedByHashMapOfSize
public static long ramBytesUsedByHashMapOfSize(int size)
-
ramBytesUsedByUnmodifiableArrayListOfSize
public static long ramBytesUsedByUnmodifiableArrayListOfSize(int size)
-
ramBytesUsedByObjectArrayOfLength
public static long ramBytesUsedByObjectArrayOfLength(int length)
-
-