public class DefaultSizeOfEngineProviderConfiguration extends java.lang.Object implements org.ehcache.spi.service.ServiceCreationConfiguration<org.ehcache.core.spi.store.heap.SizeOfEngineProvider,DefaultSizeOfEngineProviderConfiguration>
ServiceCreationConfiguration for the default SizeOfEngineProvider.| Constructor and Description |
|---|
DefaultSizeOfEngineProviderConfiguration(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 |
|---|---|
DefaultSizeOfEngineProviderConfiguration |
build(DefaultSizeOfEngineProviderConfiguration configuration) |
DefaultSizeOfEngineProviderConfiguration |
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 DefaultSizeOfEngineProviderConfiguration(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.ServiceCreationConfiguration<org.ehcache.core.spi.store.heap.SizeOfEngineProvider,DefaultSizeOfEngineProviderConfiguration>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 DefaultSizeOfEngineProviderConfiguration derive()
derive in interface org.ehcache.spi.service.ServiceCreationConfiguration<org.ehcache.core.spi.store.heap.SizeOfEngineProvider,DefaultSizeOfEngineProviderConfiguration>public DefaultSizeOfEngineProviderConfiguration build(DefaultSizeOfEngineProviderConfiguration configuration)
build in interface org.ehcache.spi.service.ServiceCreationConfiguration<org.ehcache.core.spi.store.heap.SizeOfEngineProvider,DefaultSizeOfEngineProviderConfiguration>