Top Description Constructors Methods
net.sf.ehcache.store.disk

public Class DiskSizeOfEngine

extends Object
implements SizeOfEngine
Class Inheritance
All Implemented Interfaces
net.sf.ehcache.pool.SizeOfEngine
Imports
net.sf.ehcache.pool.Size, .SizeOfEngine

SizeOf engine which calculates exact usage of the disk store.
Author
Ludovic Orban

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public SizeOfEngine
copyWith(int
maximum depth of the object graph to traverse
maxDepth
,
boolean
true if the object traversal should be aborted when the max depth is exceeded
abortWhenMaxDepthExceeded
)

Implements net.sf.ehcache.pool.SizeOfEngine.copyWith.

Make a copy of the SizeOf engine, preserving all of its internal state but overriding the specified parameters
public Size
sizeOf(Object
the key of the element
key
,
Object
the value of the element
value
,
Object
the container of the element, ie: element object + eventual overhead
container
)

Implements net.sf.ehcache.pool.SizeOfEngine.sizeOf.

Size an element
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DiskSizeOfEngineback to summary
public DiskSizeOfEngine()

Method Detail

copyWithback to summary
public SizeOfEngine copyWith(int maxDepth, boolean abortWhenMaxDepthExceeded)

Implements net.sf.ehcache.pool.SizeOfEngine.copyWith.

Doc from net.sf.ehcache.pool.SizeOfEngine.copyWith.

Make a copy of the SizeOf engine, preserving all of its internal state but overriding the specified parameters

Parameters
maxDepth:int

maximum depth of the object graph to traverse

abortWhenMaxDepthExceeded:boolean

true if the object traversal should be aborted when the max depth is exceeded

Returns:SizeOfEngine

a copy of the SizeOf engine using the specified parameters

sizeOfback to summary
public Size sizeOf(Object key, Object value, Object container)

Implements net.sf.ehcache.pool.SizeOfEngine.sizeOf.

Doc from net.sf.ehcache.pool.SizeOfEngine.sizeOf.

Size an element

Parameters
key:Object

the key of the element

value:Object

the value of the element

container:Object

the container of the element, ie: element object + eventual overhead

Returns:Size

the size of the element in bytes