Package org.ehcache.sizeof
Class SizeOf.CachingSizeOfVisitor
- java.lang.Object
-
- org.ehcache.sizeof.SizeOf.CachingSizeOfVisitor
-
- All Implemented Interfaces:
ObjectGraphWalker.Visitor
- Enclosing class:
- SizeOf
private class SizeOf.CachingSizeOfVisitor extends java.lang.Object implements ObjectGraphWalker.Visitor
Will Cache already visited types
-
-
Field Summary
Fields Modifier and Type Field Description private WeakIdentityConcurrentMap<java.lang.Class<?>,java.lang.Long>
cache
-
Constructor Summary
Constructors Modifier Constructor Description private
CachingSizeOfVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
visit(java.lang.Object object)
The visit method executed on each node
-
-
-
Field Detail
-
cache
private final WeakIdentityConcurrentMap<java.lang.Class<?>,java.lang.Long> cache
-
-
Method Detail
-
visit
public long visit(java.lang.Object object)
The visit method executed on each node- Specified by:
visit
in interfaceObjectGraphWalker.Visitor
- Parameters:
object
- the reference at that node- Returns:
- a long for you to do things with...
-
-