Class MemoryConfiguration

All Implemented Interfaces:
Matchable<MemoryConfiguration>, Updatable<MemoryConfiguration>

public class MemoryConfiguration extends ConfigurationElement<MemoryConfiguration>
Controls the memory storage configuration for the cache.
Author:
William Burns
  • Field Details Link icon

  • Method Details Link icon

    • isOffHeap Link icon

      public boolean isOffHeap()
      Returns:
      true if the storage is off-heap
    • maxSizeBytes Link icon

      public long maxSizeBytes()
      Returns:
      The max size in bytes or -1 if not configured.
    • maxSize Link icon

      public String maxSize()
    • maxSize Link icon

      public void maxSize(String maxSize)
    • maxCount Link icon

      public long maxCount()
      Returns:
      the max number of entries in memory or -1 if not configured.
    • maxCount Link icon

      public void maxCount(long maxCount)
    • storageType Link icon

      @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 Link icon

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

      @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 Link icon

      @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 Link icon

      @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 Link icon

      @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 Link icon

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

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

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