Interface EmbeddedCacheConfiguration

All Superinterfaces:
org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration, org.wildfly.clustering.cache.infinispan.BasicCacheContainerConfiguration, org.wildfly.clustering.cache.CacheConfiguration, EmbeddedCacheContainerConfiguration

public interface EmbeddedCacheConfiguration extends EmbeddedCacheContainerConfiguration, org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
Configuration associated with an embedded Infinispan cache.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    <K,V> org.infinispan.Cache<K,V>
     
    default org.infinispan.manager.EmbeddedCacheManager
     
    default <K,V> org.wildfly.clustering.cache.CacheEntryMutatorFactory<K,V>
     
    default <K,V,O> org.wildfly.clustering.cache.CacheEntryMutatorFactory<K,O>
     
    default org.wildfly.clustering.cache.CacheProperties
     
    default String
     
    default <K,V> org.infinispan.Cache<K,V>
    Returns a cache with select-for-update semantics.
    default <K,V> org.infinispan.Cache<K,V>
    Returns a cache for use with write operations, e.g. put/compute/replace.
    default io.github.resilience4j.retry.RetryConfig
    Returns a retry configuration suitable for operations on this cache.
    default <K,V> org.infinispan.Cache<K,V>
    Returns a cache whose write operations do not trigger cache listeners.
    default Duration
     
    default Optional<jakarta.transaction.TransactionManager>
     
    default <K,V> org.infinispan.Cache<K,V>
    Returns a cache with try-lock write semantic, e.g. whose write operations will return null if another transaction owns the write lock.
    default <K,V> org.infinispan.Cache<K,V>
    Returns a cache with select-for-update and try-lock semantics.
    default <K,V> org.infinispan.Cache<K,V>
    Returns a cache for use with write-only operations, e.g. put/remove where previous values are not needed.
    default boolean
     
    default boolean
    Indicates whether write operations should tolerate remote failures.
    of(org.infinispan.Cache<?,?> cache)
    Creates a cache configuration for the specified cache.
    of(org.infinispan.manager.EmbeddedCacheManager container, String cacheName)
    Creates a cache configuration using the specified cache of the specified manager.

    Methods inherited from interface org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration

    getBatchFactory

    Methods inherited from interface EmbeddedCacheContainerConfiguration

    getExecutor
  • Method Details

    • of

      static EmbeddedCacheConfiguration of(org.infinispan.manager.EmbeddedCacheManager container, String cacheName)
      Creates a cache configuration using the specified cache of the specified manager.
      Parameters:
      container - a cache container
      cacheName - a cache name
      Returns:
      a cache configuration
    • of

      static EmbeddedCacheConfiguration of(org.infinispan.Cache<?,?> cache)
      Creates a cache configuration for the specified cache.
      Parameters:
      cache - a cache
      Returns:
      a cache configuration
    • getCache

      <K,V> org.infinispan.Cache<K,V> getCache()
      Specified by:
      getCache in interface org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
    • getName

      default String getName()
      Specified by:
      getName in interface org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
      Specified by:
      getName in interface org.wildfly.clustering.cache.infinispan.BasicCacheContainerConfiguration
      Specified by:
      getName in interface EmbeddedCacheContainerConfiguration
    • isActive

      default boolean isActive()
      Specified by:
      isActive in interface org.wildfly.clustering.cache.CacheConfiguration
    • getCacheEntryMutatorFactory

      default <K,V> org.wildfly.clustering.cache.CacheEntryMutatorFactory<K,V> getCacheEntryMutatorFactory()
      Specified by:
      getCacheEntryMutatorFactory in interface org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
    • getCacheEntryMutatorFactory

      default <K,V,O> org.wildfly.clustering.cache.CacheEntryMutatorFactory<K,O> getCacheEntryMutatorFactory(Function<O, BiFunction<Object,V,V>> functionFactory)
      Specified by:
      getCacheEntryMutatorFactory in interface org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
    • getTransactionManager

      default Optional<jakarta.transaction.TransactionManager> getTransactionManager()
      Specified by:
      getTransactionManager in interface org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
    • getCacheContainer

      default org.infinispan.manager.EmbeddedCacheManager getCacheContainer()
      Specified by:
      getCacheContainer in interface org.wildfly.clustering.cache.infinispan.BasicCacheContainerConfiguration
      Specified by:
      getCacheContainer in interface EmbeddedCacheContainerConfiguration
    • getCacheProperties

      default org.wildfly.clustering.cache.CacheProperties getCacheProperties()
      Specified by:
      getCacheProperties in interface org.wildfly.clustering.cache.CacheConfiguration
    • isFaultTolerant

      default boolean isFaultTolerant()
      Indicates whether write operations should tolerate remote failures.
      Returns:
      true, if a remote exception should not prevent a cache operation from succeeding, false otherwise.
    • getReadWriteCache

      default <K,V> org.infinispan.Cache<K,V> getReadWriteCache()
      Returns a cache for use with write operations, e.g. put/compute/replace.
      Specified by:
      getReadWriteCache in interface org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
      Type Parameters:
      K - the cache key type
      V - the cache value type
      Returns:
      a cache with write semantics.
    • getReadForUpdateCache

      default <K,V> org.infinispan.Cache<K,V> getReadForUpdateCache()
      Returns a cache with select-for-update semantics.
      Type Parameters:
      K - the cache key type
      V - the cache value type
      Returns:
      a cache with select-for-update semantics.
    • getTryLockCache

      default <K,V> org.infinispan.Cache<K,V> getTryLockCache()
      Returns a cache with try-lock write semantic, e.g. whose write operations will return null if another transaction owns the write lock.
      Type Parameters:
      K - the cache key type
      V - the cache value type
      Returns:
      a cache with try-lock semantics.
    • getTryReadForUpdateCache

      default <K,V> org.infinispan.Cache<K,V> getTryReadForUpdateCache()
      Returns a cache with select-for-update and try-lock semantics.
      Type Parameters:
      K - the cache key type
      V - the cache value type
      Returns:
      a cache with try-lock and select-for-update semantics.
    • getWriteOnlyCache

      default <K,V> org.infinispan.Cache<K,V> getWriteOnlyCache()
      Returns a cache for use with write-only operations, e.g. put/remove where previous values are not needed.
      Specified by:
      getWriteOnlyCache in interface org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
      Type Parameters:
      K - the cache key type
      V - the cache value type
      Returns:
      a cache for use with write-only operations.
    • getSilentWriteCache

      default <K,V> org.infinispan.Cache<K,V> getSilentWriteCache()
      Returns a cache whose write operations do not trigger cache listeners.
      Type Parameters:
      K - the cache key type
      V - the cache value type
      Returns:
      a cache whose write operations do not trigger cache listeners.
    • getRetryConfig

      default io.github.resilience4j.retry.RetryConfig getRetryConfig()
      Returns a retry configuration suitable for operations on this cache.
      Returns:
      a retry configuration
    • getStopTimeout

      default Duration getStopTimeout()
      Specified by:
      getStopTimeout in interface org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration