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

    Fields
    Modifier and Type
    Field
    Description
    static 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>
     

    Fields inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement

    attributes, CHILDLESS, children, element, repeated
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0, use whenFull()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0, use maxCount() or maxSize() to obtain either the maximum number of entries or the maximum size of the data container.
    Deprecated, for removal: This API element is subject to removal in a future version.
    boolean
    Returns whether remove eviction is in use
    boolean
     
    long
     
    void
    maxCount(long maxCount)
     
     
    void
    maxSize(String maxSize)
     
    long
     
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0, use maxCount() or maxSize() to obtain either the maximum number of entries or the maximum size of the data container.
    void
    size(long newSize)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Since 11.0, use maxCount(long) or maxSize(String) to dynamically configure the maximum number of entries or the maximum size of the data container.
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    Use storage() instead.
     

    Methods inherited from class org.infinispan.commons.configuration.attributes.ConfigurationElement

    attributes, child, children, children, elementName, equals, findAttribute, hashCode, isModified, list, matches, toString, update, validateUpdate, write

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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

      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(forRemoval=true, since="11.0") public StorageType storageType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use storage() instead.
      Storage type to use for the data container
    • storage

      public StorageType storage()
      Returns:
      The memory StorageType.
    • size

      @Deprecated(forRemoval=true, since="11.0") public long size()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0, use maxCount() or maxSize() 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(forRemoval=true, since="11.0") public void size(long newSize)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0, use maxCount(long) or maxSize(String) to dynamically configure the maximum number of entries or the maximum size of the data container.
    • evictionType

      @Deprecated(forRemoval=true, since="11.0") public EvictionType evictionType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0, use maxCount() or maxSize() to obtain either the maximum number of entries or the maximum size of the data container.
      The configured eviction type
    • evictionStrategy

      @Deprecated(forRemoval=true, since="11.0") public EvictionStrategy evictionStrategy()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 11.0, use whenFull()
      The configured eviction strategy
    • whenFull

      public EvictionStrategy whenFull()
      Returns:
      The configured EvictionStrategy.
    • isEvictionEnabled

      public boolean isEvictionEnabled()
      Returns whether remove eviction is in use
    • heapConfiguration

      @Deprecated(forRemoval=true, since="11.0") public MemoryStorageConfiguration heapConfiguration()
      Deprecated, for removal: This API element is subject to removal in a future version.