public class DefaultSizeOfEngineConfiguration extends java.lang.Object implements org.ehcache.spi.service.ServiceConfiguration<org.ehcache.core.spi.store.heap.SizeOfEngineProvider,DefaultSizeOfEngineConfiguration>
ServiceConfiguration for the default SizeOfEngineProvider.| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_MAX_OBJECT_SIZE
Default maximum object size after which sizing stops
|
static int |
DEFAULT_OBJECT_GRAPH_SIZE
Default maximum object graph count after which sizing stops
|
static org.ehcache.config.units.MemoryUnit |
DEFAULT_UNIT
Default maximum object size unit after which sizing stops
|
| Constructor and Description |
|---|
DefaultSizeOfEngineConfiguration(long size,
org.ehcache.config.units.MemoryUnit unit,
long objectGraphSize)
Creates a new configuration object with the provided parameters.
|
| Modifier and Type | Method and Description |
|---|---|
DefaultSizeOfEngineConfiguration |
build(DefaultSizeOfEngineConfiguration config) |
DefaultSizeOfEngineConfiguration |
derive() |
long |
getMaxObjectGraphSize()
Returns the maximum object graph size before aborting sizing.
|
long |
getMaxObjectSize()
Returns the maximum object size before aborting sizing.
|
java.lang.Class<org.ehcache.core.spi.store.heap.SizeOfEngineProvider> |
getServiceType() |
org.ehcache.config.units.MemoryUnit |
getUnit()
Returns the maximum object size unit.
|
public static final int DEFAULT_OBJECT_GRAPH_SIZE
public static final long DEFAULT_MAX_OBJECT_SIZE
public static final org.ehcache.config.units.MemoryUnit DEFAULT_UNIT
public DefaultSizeOfEngineConfiguration(long size,
org.ehcache.config.units.MemoryUnit unit,
long objectGraphSize)
size - the maximum object sizeunit - the object size unitobjectGraphSize - the maximum object graph sizepublic java.lang.Class<org.ehcache.core.spi.store.heap.SizeOfEngineProvider> getServiceType()
getServiceType in interface org.ehcache.spi.service.ServiceConfiguration<org.ehcache.core.spi.store.heap.SizeOfEngineProvider,DefaultSizeOfEngineConfiguration>public long getMaxObjectGraphSize()
This measure is a count of different instances that have to be sized from the root of the graph. That is a collection with 1000 identical elements will count as two objects, while a collection with 1000 different elements will count as 1001 objects.
public long getMaxObjectSize()
This value applies to the sum of the size of objects composing the graph being sized.
getUnit()public org.ehcache.config.units.MemoryUnit getUnit()
getMaxObjectSize()public DefaultSizeOfEngineConfiguration derive()
derive in interface org.ehcache.spi.service.ServiceConfiguration<org.ehcache.core.spi.store.heap.SizeOfEngineProvider,DefaultSizeOfEngineConfiguration>public DefaultSizeOfEngineConfiguration build(DefaultSizeOfEngineConfiguration config)
build in interface org.ehcache.spi.service.ServiceConfiguration<org.ehcache.core.spi.store.heap.SizeOfEngineProvider,DefaultSizeOfEngineConfiguration>