Class MemoryConfiguration
- java.lang.Object
-
- org.infinispan.configuration.cache.MemoryConfiguration
-
- All Implemented Interfaces:
org.infinispan.commons.configuration.attributes.Matchable<MemoryConfiguration>
,BaseConfigurationInfo
,ConfigurationInfo
public class MemoryConfiguration extends Object implements org.infinispan.commons.configuration.attributes.Matchable<MemoryConfiguration>, ConfigurationInfo
Controls the memory storage configuration for the cache.- Author:
- William Burns
-
-
Field Summary
Fields Modifier and Type Field Description static org.infinispan.commons.configuration.elements.ElementDefinition<?>
ELEMENT_DEFINITION
static org.infinispan.commons.configuration.attributes.AttributeDefinition<Long>
MAX_COUNT
static org.infinispan.commons.configuration.attributes.AttributeDefinition<String>
MAX_SIZE
static org.infinispan.commons.configuration.attributes.AttributeDefinition<StorageType>
STORAGE
static org.infinispan.commons.configuration.attributes.AttributeDefinition<EvictionStrategy>
WHEN_FULL
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.infinispan.commons.configuration.attributes.AttributeSet
attributes()
boolean
equals(Object o)
EvictionStrategy
evictionStrategy()
Deprecated.Since 11.0, usewhenFull()
EvictionType
evictionType()
Deprecated.Since 11.0, usemaxCount()
ormaxSize()
to obtain either the maximum number of entries or the maximum size of the data container.org.infinispan.commons.configuration.elements.ElementDefinition<?>
getElementDefinition()
int
hashCode()
MemoryStorageConfiguration
heapConfiguration()
Deprecated.boolean
isEvictionEnabled()
Returns whether remove eviction is in useboolean
isOffHeap()
long
maxCount()
void
maxCount(long maxCount)
String
maxSize()
void
maxSize(String maxSize)
long
maxSizeBytes()
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.StorageType
storage()
StorageType
storageType()
Deprecated.Usestorage()
instead.String
toString()
EvictionStrategy
whenFull()
-
Methods inherited from interface org.infinispan.commons.configuration.ConfigurationInfo
subElements
-
-
-
-
Field Detail
-
ELEMENT_DEFINITION
public static final org.infinispan.commons.configuration.elements.ElementDefinition<?> ELEMENT_DEFINITION
-
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 Detail
-
getElementDefinition
public org.infinispan.commons.configuration.elements.ElementDefinition<?> getElementDefinition()
- Specified by:
getElementDefinition
in interfaceBaseConfigurationInfo
- Returns:
- the
ElementDefinition
of the configuration.
-
attributes
public org.infinispan.commons.configuration.attributes.AttributeSet attributes()
- Specified by:
attributes
in interfaceBaseConfigurationInfo
- Returns:
- the
AttributeSet
declared by the configuration.
-
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
public String maxSize()
-
maxSize
public void maxSize(String 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 public StorageType storageType()
Deprecated.Usestorage()
instead.Storage type to use for the data container
-
storage
public StorageType storage()
- Returns:
- The memory
StorageType
.
-
size
@Deprecated public long 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 public 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.
-
evictionType
@Deprecated public EvictionType 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 public EvictionStrategy evictionStrategy()
Deprecated.Since 11.0, usewhenFull()
The configured eviction strategy
-
whenFull
public EvictionStrategy whenFull()
- Returns:
- The configured
EvictionStrategy
.
-
isEvictionEnabled
public boolean isEvictionEnabled()
Returns whether remove eviction is in use
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
toString
public String toString()
-
heapConfiguration
@Deprecated public MemoryStorageConfiguration heapConfiguration()
Deprecated.
-
-