Class MemoryConfiguration
java.lang.Object
org.infinispan.commons.configuration.attributes.ConfigurationElement<MemoryConfiguration>
org.infinispan.configuration.cache.MemoryConfiguration
- All Implemented Interfaces:
org.infinispan.commons.configuration.attributes.Matchable<MemoryConfiguration>
,org.infinispan.commons.configuration.attributes.Updatable<MemoryConfiguration>
public class MemoryConfiguration
extends org.infinispan.commons.configuration.attributes.ConfigurationElement<MemoryConfiguration>
Controls the memory storage configuration for the cache.
- Author:
- William Burns
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.infinispan.commons.configuration.attributes.AttributeDefinition<Long>
static final org.infinispan.commons.configuration.attributes.AttributeDefinition<String>
static final org.infinispan.commons.configuration.attributes.AttributeDefinition<StorageType>
static final org.infinispan.commons.configuration.attributes.AttributeDefinition<EvictionStrategy>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.Deprecated.Since 11.0, usemaxCount()
ormaxSize()
to obtain either the maximum number of entries or the maximum size of the data container.int
hashCode()
Deprecated.boolean
Returns whether remove eviction is in useboolean
long
maxCount()
void
maxCount
(long maxCount) maxSize()
void
long
long
size()
Deprecated.Since 11.0, usemaxCount()
ormaxSize()
to obtain either the maximum number of entries or the maximum size of the data container.void
size
(long newSize) Deprecated.Since 11.0, usemaxCount(long)
ormaxSize(String)
to dynamically configure the maximum number of entries or the maximum size of the data container.storage()
Deprecated.Usestorage()
instead.toString()
whenFull()
-
Field Details
-
STORAGE
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<StorageType> STORAGE -
MAX_SIZE
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<String> MAX_SIZE -
MAX_COUNT
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<Long> MAX_COUNT -
WHEN_FULL
public static final org.infinispan.commons.configuration.attributes.AttributeDefinition<EvictionStrategy> WHEN_FULL
-
-
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
-
maxCount
public long maxCount()- Returns:
- the max number of entries in memory or -1 if not configured.
-
maxCount
public void maxCount(long maxCount) -
storageType
Deprecated.Usestorage()
instead.Storage type to use for the data container -
storage
- Returns:
- The memory
StorageType
.
-
size
Deprecated.Since 11.0, usemaxCount()
ormaxSize()
to obtain either the maximum number of entries or the maximum size of the data container.Size of the eviction, -1 if disabled -
size
Deprecated.Since 11.0, usemaxCount(long)
ormaxSize(String)
to dynamically configure the maximum number of entries or the maximum size of the data container. -
evictionType
Deprecated.Since 11.0, usemaxCount()
ormaxSize()
to obtain either the maximum number of entries or the maximum size of the data container.The configured eviction type -
evictionStrategy
Deprecated.Since 11.0, usewhenFull()
The configured eviction strategy -
whenFull
- Returns:
- The configured
EvictionStrategy
.
-
isEvictionEnabled
public boolean isEvictionEnabled()Returns whether remove eviction is in use -
equals
-
hashCode
public int hashCode() -
toString
-
heapConfiguration
Deprecated.
-
whenFull()