Package org.ehcache.sizeof.impl
Class UnsafeSizeOf
- java.lang.Object
-
- org.ehcache.sizeof.SizeOf
-
- org.ehcache.sizeof.impl.UnsafeSizeOf
-
public class UnsafeSizeOf extends SizeOf
Unsafe.theUnsafebased sizeOf measurement All constructors will throw UnsupportedOperationException if theUnsafe isn't accessible on this platform
-
-
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, boolean bypassFlyweight)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 org.ehcache.sizeof.SizeOf
deepSizeOf, deepSizeOf, newInstance, newInstance
-
-
-
-
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(org.ehcache.sizeof.filters.SizeOfFilter, boolean, 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(org.ehcache.sizeof.filters.SizeOfFilter, boolean, boolean),SizeOfFilter
-
UnsafeSizeOf
public UnsafeSizeOf(SizeOfFilter filter, boolean caching, boolean bypassFlyweight) 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 fieldsbypassFlyweight- whether "Flyweight Objects" are to be ignored- Throws:
java.lang.UnsupportedOperationException- If Unsafe isn't accessible- See Also:
SizeOfFilter
-
-