public class DefaultSizeOfEngineProviderConfiguration extends java.lang.Object implements ServiceCreationConfiguration<SizeOfEngineProvider,DefaultSizeOfEngineProviderConfiguration>
ServiceCreationConfiguration
for the default SizeOfEngineProvider
.Constructor and Description |
---|
DefaultSizeOfEngineProviderConfiguration(long size,
MemoryUnit unit,
long objectGraphSize)
Creates a new configuration object with the provided parameters.
|
Modifier and Type | Method and Description |
---|---|
DefaultSizeOfEngineProviderConfiguration |
build(DefaultSizeOfEngineProviderConfiguration configuration)
Construct a new configuration from the given detached representation.
|
DefaultSizeOfEngineProviderConfiguration |
derive()
Derive a detached representation from this configuration
|
long |
getMaxObjectGraphSize()
Returns the maximum object graph size before aborting sizing.
|
long |
getMaxObjectSize()
Returns the maximum object size before aborting sizing.
|
java.lang.Class<SizeOfEngineProvider> |
getServiceType()
Indicates which service consumes this configuration at creation.
|
MemoryUnit |
getUnit()
Returns the maximum object size unit.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compatibleWith
public DefaultSizeOfEngineProviderConfiguration(long size, MemoryUnit unit, long objectGraphSize)
size
- the maximum object sizeunit
- the object size unitobjectGraphSize
- the maximum object graph sizepublic java.lang.Class<SizeOfEngineProvider> getServiceType()
getServiceType
in interface ServiceCreationConfiguration<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 MemoryUnit getUnit()
getMaxObjectSize()
public DefaultSizeOfEngineProviderConfiguration derive()
ServiceCreationConfiguration
derive
in interface ServiceCreationConfiguration<SizeOfEngineProvider,DefaultSizeOfEngineProviderConfiguration>
public DefaultSizeOfEngineProviderConfiguration build(DefaultSizeOfEngineProviderConfiguration configuration)
ServiceCreationConfiguration
build
in interface ServiceCreationConfiguration<SizeOfEngineProvider,DefaultSizeOfEngineProviderConfiguration>
configuration
- a detached representation