public class UnsafeSizeOf extends SizeOf
Unsafe.theUnsafe
based sizeOf measurement
All constructors will throw UnsupportedOperationException if theUnsafe isn't accessible on this platformConstructor and Description |
---|
UnsafeSizeOf()
Builds a new SizeOf that will not filter fields and will cache reflected fields
|
UnsafeSizeOf(SizeOfFilter filter)
Builds a new SizeOf that will filter fields according to the provided filter and will cache reflected fields
|
UnsafeSizeOf(SizeOfFilter filter,
boolean caching)
Builds a new SizeOf that will filter fields according to the provided filter
|
Modifier and Type | Method and Description |
---|---|
long |
sizeOf(Object obj)
Calculates the size in memory (heap) of the instance passed in, not navigating the down graph
|
deepSizeOf
public UnsafeSizeOf() throws UnsupportedOperationException
UnsupportedOperationException
- If Unsafe isn't accessibleUnsafeSizeOf(net.sf.ehcache.pool.sizeof.filter.SizeOfFilter, boolean)
public UnsafeSizeOf(SizeOfFilter filter) throws UnsupportedOperationException
filter
- The filter to applyUnsupportedOperationException
- If Unsafe isn't accessibleUnsafeSizeOf(net.sf.ehcache.pool.sizeof.filter.SizeOfFilter, boolean)
,
SizeOfFilter
public UnsafeSizeOf(SizeOfFilter filter, boolean caching) throws UnsupportedOperationException
filter
- The filter to applycaching
- whether to cache reflected fieldsUnsupportedOperationException
- If Unsafe isn't accessibleSizeOfFilter
Copyright © 2003-2013 Terracotta, Inc.. All Rights Reserved.