Package org.teiid.common.buffer.impl
Class SizeUtility
- java.lang.Object
-
- org.teiid.common.buffer.impl.SizeUtility
-
public final class SizeUtility extends Object
Utility methods to determine the size of Java objects, particularly with respect to the Teiid runtime types. The sizes are loosely based on expected heap size and are generally optimistic. Actual object allocation efficiency can be quite poor.
-
-
Field Summary
Fields Modifier and Type Field Description static int
REFERENCE_SIZE
-
Constructor Summary
Constructors Constructor Description SizeUtility(Class<?>[] types)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getBatchSize(boolean accountForValueCache, List<? extends List<?>> data)
static int
getSize(boolean isValueCacheEnabled, Class<?> type)
static long
getSize(Object obj, boolean accountForValueCache)
Get size of objectstatic boolean
isVariableSize(Class<?> type)
-
-
-
Field Detail
-
REFERENCE_SIZE
public static final int REFERENCE_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SizeUtility
public SizeUtility(Class<?>[] types)
-
-