org.teiid.common.buffer.impl
Class SizeUtility

java.lang.Object
  extended by org.teiid.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 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
static int REFERENCE_SIZE
           
 
Constructor Summary
SizeUtility()
           
 
Method Summary
 long getBatchSize(TupleBatch data)
           
protected  long getSize(java.lang.Object obj, boolean updateEstimate, boolean accountForValueCache)
          Get size of object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REFERENCE_SIZE

public static final int REFERENCE_SIZE
See Also:
Constant Field Values
Constructor Detail

SizeUtility

public SizeUtility()
Method Detail

getBatchSize

public long getBatchSize(TupleBatch data)

getSize

protected long getSize(java.lang.Object obj,
                       boolean updateEstimate,
                       boolean accountForValueCache)
Get size of object

Returns:
Size in bytes


Copyright © 2011. All Rights Reserved.