com.metamatrix.common.buffer.impl
Class SizeUtility
java.lang.Object
com.metamatrix.common.buffer.impl.SizeUtility
public final class SizeUtility
- extends java.lang.Object
Utility methods to determine the size of Java objects, particularly with
respect to the MetaMatrix runtime types.
Method Summary |
static long |
getBatchSize(java.lang.String[] types,
java.util.List[] data)
This method calculates the sizes of the tuples based on their list sizes
Since we know the type and length, it jsut calculates size from that
information, instead of walking whole object tree. |
static long |
getSize(java.lang.Object obj)
Get size of object |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IS_64BIT
public static final boolean IS_64BIT
REFERENCE_SIZE
public static final int REFERENCE_SIZE
getBatchSize
public static long getBatchSize(java.lang.String[] types,
java.util.List[] data)
- This method calculates the sizes of the tuples based on their list sizes
Since we know the type and length, it jsut calculates size from that
information, instead of walking whole object tree.
- Parameters:
types
- - Data type for the each columndata
- - data
- Returns:
- size in total
getSize
public static long getSize(java.lang.Object obj)
- Get size of object
- Returns:
- Size in bytes
Copyright © 2009. All Rights Reserved.