Class MemoryConfiguration
java.lang.Object
org.infinispan.commons.configuration.attributes.ConfigurationElement<MemoryConfiguration>
org.infinispan.configuration.cache.MemoryConfiguration
- All Implemented Interfaces:
Matchable<MemoryConfiguration>, Updatable<MemoryConfiguration>
Controls the memory storage configuration for the cache.
- Author:
- William Burns
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AttributeDefinition<String> static final AttributeDefinition<Long> static final AttributeDefinition<String> static final AttributeDefinition<StorageType> static final AttributeDefinition<EvictionStrategy> Fields inherited from class ConfigurationElement
attributes, CHILDLESS, children, element, repeated -
Method Summary
Modifier and TypeMethodDescriptionThe name of the eviction container used for eviction purposes.booleanReturns whether remove eviction is in usebooleanlongmaxCount()voidmaxCount(long maxCount) maxSize()voidmaxSize(long maxSize) voidlongstorage()Storage type to use for the data containerwhenFull()The configured eviction strategyMethods inherited from class ConfigurationElement
attributes, child, children, children, elementName, equals, extractAttributes, findAttribute, hashCode, isModified, list, matches, matches, matches, toString, update, update, update, validateUpdate, validateUpdate, validateUpdate, write
-
Field Details
-
STORAGE
-
MAX_SIZE
-
MAX_COUNT
-
WHEN_FULL
-
EVICTION_CONTAINER
-
-
Method Details
-
isOffHeap
public boolean isOffHeap()- Returns:
- true if the storage is off-heap
-
maxSizeBytes
public long maxSizeBytes()- Returns:
- The max size in bytes or -1 if not configured.
-
maxSize
-
maxSize
-
maxSize
public void maxSize(long maxSize) -
maxCount
public long maxCount()- Returns:
- the max number of entries in memory or -1 if not configured.
-
maxCount
public void maxCount(long maxCount) -
storage
Storage type to use for the data container- Returns:
- The memory
StorageType.
-
whenFull
The configured eviction strategy- Returns:
- The configured
EvictionStrategy.
-
isEvictionEnabled
public boolean isEvictionEnabled()Returns whether remove eviction is in use -
evictionContainer
The name of the eviction container used for eviction purposes. Note that when is non null, no other values should be utilized.- Returns:
- the eviction container to use for shared eviction
-