Class EclipseStoreCacheConfigurationProperties<K,V>

java.lang.Object
io.micronaut.eclipsestore.cache.EclipseStoreCacheConfigurationProperties<K,V>
Type Parameters:
K - Key Type
V - Value Type
All Implemented Interfaces:
io.micronaut.core.naming.Named, io.micronaut.core.util.Toggleable, EclipseStoreCacheConfiguration<K,V>

@EachProperty("eclipsestore.cache") public class EclipseStoreCacheConfigurationProperties<K,V> extends Object implements EclipseStoreCacheConfiguration<K,V>
Since:
1.3.0
Author:
Sergio del Amo
  • Field Details

  • Constructor Details

    • EclipseStoreCacheConfigurationProperties

      public EclipseStoreCacheConfigurationProperties(@Parameter String name)
  • Method Details

    • getKeyType

      @NonNull public @NonNull Class<K> getKeyType()
      Specified by:
      getKeyType in interface EclipseStoreCacheConfiguration<K,V>
      Returns:
      The required type of keys for the Cache.
    • setKeyType

      public void setKeyType(@Nullable @Nullable Class<K> keyType)
      Parameters:
      keyType - The required type of keys for the Cache.
    • getValueType

      @NonNull public @NonNull Class<V> getValueType()
      Specified by:
      getValueType in interface EclipseStoreCacheConfiguration<K,V>
      Returns:
      Determines type of values for the Cache.
    • setValueType

      public void setValueType(@Nullable @Nullable Class<V> valueType)
      Parameters:
      valueType - Determines type of values for the Cache.
    • getStorage

      @Nullable public @Nullable String getStorage()
      Specified by:
      getStorage in interface EclipseStoreCacheConfiguration<K,V>
      Returns:
      Name qualifier for Storage Manager.
    • setStorage

      public void setStorage(@Nullable @Nullable String storage)
      Parameters:
      storage - Name qualifier for EclipseStore Storage Manager
    • isReadThrough

      @Nullable public @Nullable Boolean isReadThrough()
      Description copied from interface: EclipseStoreCacheConfiguration
      When in "read-through" mode, cache misses that occur due to cache entries not existing as a result of performing a "get" will appropriately cause the configured CacheLoader to be invoked.
      Specified by:
      isReadThrough in interface EclipseStoreCacheConfiguration<K,V>
      Returns:
      Whether to use "read-through" mode
    • isWriteThrough

      @Nullable public @Nullable Boolean isWriteThrough()
      Description copied from interface: EclipseStoreCacheConfiguration
      When in "write-through" mode, cache updates that occur as a result of performing "put" operations will appropriately cause the configured CacheWriter to be invoked.
      Specified by:
      isWriteThrough in interface EclipseStoreCacheConfiguration<K,V>
      Returns:
      Whether to use "write-through" mode.
    • isStoreByValue

      @Nullable public @Nullable Boolean isStoreByValue()
      Description copied from interface: EclipseStoreCacheConfiguration
      When a cache is storeByValue, any mutation to the key or value does not affect the key of value stored in the cache.
      Specified by:
      isStoreByValue in interface EclipseStoreCacheConfiguration<K,V>
      Returns:
      Whether the cache is Story by value.
    • isStatisticsEnabled

      @Nullable public @Nullable Boolean isStatisticsEnabled()
      Description copied from interface: EclipseStoreCacheConfiguration
      Whether statistics collection is enabled in this cache.
      Specified by:
      isStatisticsEnabled in interface EclipseStoreCacheConfiguration<K,V>
      Returns:
      Whether statistics collection is enabled in this cache.
    • isManagementEnabled

      @Nullable public @Nullable Boolean isManagementEnabled()
      Description copied from interface: EclipseStoreCacheConfiguration
      Whether management is enabled on this cache.
      Specified by:
      isManagementEnabled in interface EclipseStoreCacheConfiguration<K,V>
      Returns:
      Whether management is enabled on this cache.
    • getName

      @NonNull public @NonNull String getName()
      Specified by:
      getName in interface io.micronaut.core.naming.Named
    • setReadThrough

      public void setReadThrough(Boolean readThrough)
      When in "read-through" mode, cache misses that occur due to cache entries not existing as a result of performing a "get" will appropriately cause the configured CacheLoader to be invoked. When you set a Storage Manager, "read-through" mode is activated.
      Parameters:
      readThrough - Whether to use "read-through" mode
    • setWriteThrough

      public void setWriteThrough(Boolean writeThrough)
      When in "write-through" mode, cache updates that occur as a result of performing "put" operations will appropriately cause the configured CacheWriter to be invoked.When you set a Storage Manager, "write-through" mode is activated.
      Parameters:
      writeThrough - Whether to use "write-through" mode.
    • setStoreByValue

      public void setStoreByValue(Boolean storeByValue)
      When a cache is storeByValue, any mutation to the key or value does not affect the key of value stored in the cache.
      Parameters:
      storeByValue - When a cache is storeByValue, any mutation to the key or value does not affect the key of value stored in the cache.
    • setStatisticsEnabled

      public void setStatisticsEnabled(Boolean statisticsEnabled)
      Whether statistics collection is enabled in this cache.
      Parameters:
      statisticsEnabled - Whether statistics collection is enabled in this cache.
    • setManagementEnabled

      public void setManagementEnabled(Boolean managementEnabled)
      Whether management is enabled on this cache.
      Parameters:
      managementEnabled - Whether management is enabled on this cache.
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable
    • setEnabled

      public void setEnabled(boolean enabled)
      Whether this cache is enabled. Default Value: true
      Parameters:
      enabled - Whether this cache is enabled.