Package net.sf.ehcache.pool.sizeof
Class UnsafeSizeOf
- java.lang.Object
-
- net.sf.ehcache.pool.sizeof.SizeOf
-
- net.sf.ehcache.pool.sizeof.UnsafeSizeOf
-
public class UnsafeSizeOf extends SizeOf
Unsafe.theUnsafebased sizeOf measurement All constructors will throw UnsupportedOperationException if theUnsafe isn't accessible on this platform- Author:
- Chris Dennis
-
-
Constructor Summary
Constructors Constructor Description UnsafeSizeOf()Builds a new SizeOf that will not filter fields and will cache reflected fieldsUnsafeSizeOf(SizeOfFilter filter)Builds a new SizeOf that will filter fields according to the provided filter and will cache reflected fieldsUnsafeSizeOf(SizeOfFilter filter, boolean caching)Builds a new SizeOf that will filter fields according to the provided filter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longsizeOf(java.lang.Object obj)Calculates the size in memory (heap) of the instance passed in, not navigating the down graph-
Methods inherited from class net.sf.ehcache.pool.sizeof.SizeOf
deepSizeOf
-
-
-
-
Constructor Detail
-
UnsafeSizeOf
public UnsafeSizeOf() throws java.lang.UnsupportedOperationExceptionBuilds a new SizeOf that will not filter fields and will cache reflected fields- Throws:
java.lang.UnsupportedOperationException- If Unsafe isn't accessible- See Also:
UnsafeSizeOf(net.sf.ehcache.pool.sizeof.filter.SizeOfFilter, boolean)
-
UnsafeSizeOf
public UnsafeSizeOf(SizeOfFilter filter) throws java.lang.UnsupportedOperationException
Builds a new SizeOf that will filter fields according to the provided filter and will cache reflected fields- Parameters:
filter- The filter to apply- Throws:
java.lang.UnsupportedOperationException- If Unsafe isn't accessible- See Also:
UnsafeSizeOf(net.sf.ehcache.pool.sizeof.filter.SizeOfFilter, boolean),SizeOfFilter
-
UnsafeSizeOf
public UnsafeSizeOf(SizeOfFilter filter, boolean caching) throws java.lang.UnsupportedOperationException
Builds a new SizeOf that will filter fields according to the provided filter- Parameters:
filter- The filter to applycaching- whether to cache reflected fields- Throws:
java.lang.UnsupportedOperationException- If Unsafe isn't accessible- See Also:
SizeOfFilter
-
-