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 TypeMethodDescription<K,V> org.infinispan.Cache <K, V> getCache()default org.infinispan.manager.EmbeddedCacheManagerdefault <K,V> org.wildfly.clustering.cache.CacheEntryMutatorFactory <K, V> default <K,V, O> org.wildfly.clustering.cache.CacheEntryMutatorFactory <K, O> getCacheEntryMutatorFactory(Function<O, BiFunction<Object, V, V>> functionFactory) default org.wildfly.clustering.cache.CachePropertiesdefault StringgetName()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.RetryConfigReturns 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 Durationdefault 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 booleanisActive()default booleanIndicates whether write operations should tolerate remote failures.static EmbeddedCacheConfigurationof(org.infinispan.Cache<?, ?> cache) Creates a cache configuration for the specified cache.static EmbeddedCacheConfigurationCreates a cache configuration using the specified cache of the specified manager.Methods inherited from interface org.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
getBatchFactoryMethods 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 containercacheName- a cache name- Returns:
- a cache configuration
-
of
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:
getCachein interfaceorg.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
-
getName
- Specified by:
getNamein interfaceorg.wildfly.clustering.cache.infinispan.BasicCacheConfiguration- Specified by:
getNamein interfaceorg.wildfly.clustering.cache.infinispan.BasicCacheContainerConfiguration- Specified by:
getNamein interfaceEmbeddedCacheContainerConfiguration
-
isActive
default boolean isActive()- Specified by:
isActivein interfaceorg.wildfly.clustering.cache.CacheConfiguration
-
getCacheEntryMutatorFactory
default <K,V> org.wildfly.clustering.cache.CacheEntryMutatorFactory<K,V> getCacheEntryMutatorFactory()- Specified by:
getCacheEntryMutatorFactoryin interfaceorg.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
-
getCacheEntryMutatorFactory
default <K,V, org.wildfly.clustering.cache.CacheEntryMutatorFactory<K,O> O> getCacheEntryMutatorFactory(Function<O, BiFunction<Object, V, V>> functionFactory) - Specified by:
getCacheEntryMutatorFactoryin interfaceorg.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
-
getTransactionManager
- Specified by:
getTransactionManagerin interfaceorg.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
-
getCacheContainer
default org.infinispan.manager.EmbeddedCacheManager getCacheContainer()- Specified by:
getCacheContainerin interfaceorg.wildfly.clustering.cache.infinispan.BasicCacheContainerConfiguration- Specified by:
getCacheContainerin interfaceEmbeddedCacheContainerConfiguration
-
getCacheProperties
default org.wildfly.clustering.cache.CacheProperties getCacheProperties()- Specified by:
getCachePropertiesin interfaceorg.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:
getReadWriteCachein interfaceorg.wildfly.clustering.cache.infinispan.BasicCacheConfiguration- Type Parameters:
K- the cache key typeV- 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 typeV- 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 typeV- 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 typeV- 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:
getWriteOnlyCachein interfaceorg.wildfly.clustering.cache.infinispan.BasicCacheConfiguration- Type Parameters:
K- the cache key typeV- 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 typeV- 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
- Specified by:
getStopTimeoutin interfaceorg.wildfly.clustering.cache.infinispan.BasicCacheConfiguration
-