Class ContainerMemoryConfigurationBuilder
java.lang.Object
org.infinispan.configuration.global.AbstractGlobalConfigurationBuilder
org.infinispan.configuration.global.ContainerMemoryConfigurationBuilder
- All Implemented Interfaces:
Builder<ContainerMemoryConfiguration>, GlobalConfigurationChildBuilder
public class ContainerMemoryConfigurationBuilder
extends AbstractGlobalConfigurationBuilder
implements Builder<ContainerMemoryConfiguration>
Configures the container memory which allows for a shared memory space used by multiple caches that can be bounded
so when the limit is surpassed an entry is evicted to ensure memory does not grow too much. The memory container
supports both count based (number of entries) and size based (how much approximate memory in bytes) eviction methods.
- Since:
- 16.1
- Author:
- William Burns
-
Method Summary
Modifier and TypeMethodDescriptioncreate()Create the configuration beanlongmaxCount()The currently configured max count.maxCount(long count) Defines the maximum number of entries for the container memory.maxSize()The currently configured max size.Defines the maximum size of the container memory.read(ContainerMemoryConfiguration template, Combine combine) Reads the configuration from an already created configuration bean into this builder.toString()voidvalidate()Validate the data in this builder before building the configuration beanMethods inherited from class AbstractGlobalConfigurationBuilder
addModule, asyncThreadPool, blockingThreadPool, build, clearModules, containerMemoryConfiguration, defaultCacheName, expirationThreadPool, getGlobalConfig, globalState, jmx, listenerThreadPool, metrics, module, modules, nonBlockingThreadPool, persistenceThreadPool, security, serialization, shutdown, tracing, transport
-
Method Details
-
attributes
- Specified by:
attributesin interfaceBuilder<ContainerMemoryConfiguration>
-
maxSize
Defines the maximum size of the container memory.- Parameters:
size- The size of the memory container in bytes. This can be a number or a string ending with KB, MB, GB, TB, PB (e.g. "10MB").- Returns:
this, for method chaining
-
maxSize
-
maxCount
Defines the maximum number of entries for the container memory.- Parameters:
count- The maximum number of entries.- Returns:
this, for method chaining
-
maxCount
public long maxCount()The currently configured max count.- Returns:
- The maximum number of entries.
-
validate
public void validate()Description copied from interface:BuilderValidate the data in this builder before building the configuration bean- Specified by:
validatein interfaceBuilder<ContainerMemoryConfiguration>
-
create
Description copied from interface:BuilderCreate the configuration bean- Specified by:
createin interfaceBuilder<ContainerMemoryConfiguration>- Returns:
-
read
public ContainerMemoryConfigurationBuilder read(ContainerMemoryConfiguration template, Combine combine) Description copied from interface:BuilderReads the configuration from an already created configuration bean into this builder. Returns an appropriate builder to allow fluent configuration- Specified by:
readin interfaceBuilder<ContainerMemoryConfiguration>- Parameters:
template- the configuration from which to "clone" this config if needed.combine- the way attributes and children of this instance and the template should be combined.
-
toString
-