Class 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.
    • Constructor Detail

      • SizeUtility

        public SizeUtility​(Class<?>[] types)
    • Method Detail

      • getBatchSize

        public long getBatchSize​(boolean accountForValueCache,
                                 List<? extends List<?>> data)
      • isVariableSize

        public static boolean isVariableSize​(Class<?> type)
      • getSize

        public static int getSize​(boolean isValueCacheEnabled,
                                  Class<?> type)
      • getSize

        public static long getSize​(Object obj,
                                   boolean accountForValueCache)
        Get size of object
        Returns:
        Size in bytes