|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ehcache.sizeof.SizeOf
org.ehcache.sizeof.impl.AgentSizeOf
public class AgentSizeOf
SizeOf implementation that relies on a Java agent to be loaded to do the measurement It will try to load the agent through the JDK6 Attach API if available All it's constructor do throw UnsupportedOperationException if the agent isn't present or couldn't be loaded dynamically Inspired by Dr. Heinz Kabutz's Java Specialist Newsletter Issue #142
| Field Summary | |
|---|---|
static String |
BYPASS_LOADING
System property name to bypass attaching to the VM and loading of Java agent to measure Object sizes. |
| Constructor Summary | |
|---|---|
AgentSizeOf()
Builds a new SizeOf that will not filter fields and will cache reflected fields |
|
AgentSizeOf(SizeOfFilter filter)
Builds a new SizeOf that will filter fields according to the provided filter and will cache reflected fields |
|
AgentSizeOf(SizeOfFilter filter,
boolean caching,
boolean bypassFlyweight)
Builds a new SizeOf that will filter fields according to the provided filter |
|
| Method Summary | |
|---|---|
long |
sizeOf(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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String BYPASS_LOADING
| Constructor Detail |
|---|
public AgentSizeOf()
throws UnsupportedOperationException
UnsupportedOperationException - If agent couldn't be loaded or isn't presentAgentSizeOf(SizeOfFilter, boolean, boolean)
public AgentSizeOf(SizeOfFilter filter)
throws UnsupportedOperationException
filter - The filter to apply
UnsupportedOperationException - If agent couldn't be loaded or isn't presentAgentSizeOf(SizeOfFilter, boolean, boolean),
SizeOfFilter
public AgentSizeOf(SizeOfFilter filter,
boolean caching,
boolean bypassFlyweight)
throws UnsupportedOperationException
filter - The filter to applycaching - whether to cache reflected fieldsbypassFlyweight - whether "Flyweight Objects" are to be ignored
UnsupportedOperationException - If agent couldn't be loaded or isn't presentSizeOfFilter| Method Detail |
|---|
public long sizeOf(Object obj)
SizeOf
sizeOf in class SizeOfobj - the object to measure the size of
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||