Class LoomJCacheConfig<K,V>
java.lang.Object
com.loomcache.server.jcache.LoomJCacheConfig<K,V>
- Type Parameters:
K- the key typeV- the value type
- All Implemented Interfaces:
Serializable, javax.cache.configuration.CompleteConfiguration<K,V>, javax.cache.configuration.Configuration<K, V>
public final class LoomJCacheConfig<K,V>
extends Object
implements javax.cache.configuration.CompleteConfiguration<K,V>
JCache-compatible configuration for a LoomCache cache instance.
Implements CompleteConfiguration so it can be passed
directly to CacheManager.createCache(String, javax.cache.configuration.Configuration).
Supports standard cache settings: store-by-value vs store-by-reference, read-through/write-through caching, statistics, management, and expiry policies.
Immutable configuration built via the Builder pattern.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic enumExpiry policy types as per JCache specification. -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> LoomJCacheConfig.Builder <K, V> builder()static <K,V> LoomJCacheConfig.Builder <K, V> booleanWhether Raft-replicated backing storage is enabled (seeJCacheDistributedMapAdapter).@Nullable DataStructureRegistryRegistry used to resolve the backing Raft-replicated map whendistributedEnabled()is true.@Nullable javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K, ? super V>> javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> booleanbooleanbooleanbooleanbooleanbooleanintbooleanbooleanbooleanbooleanboolean
-
Method Details
-
cacheName
-
storeByValue
public boolean storeByValue() -
storeByReference
public boolean storeByReference() -
readThrough
public boolean readThrough() -
writeThrough
public boolean writeThrough() -
statisticsEnabled
public boolean statisticsEnabled() -
managementEnabled
public boolean managementEnabled() -
expiryPolicyType
-
expiryDuration
-
maxIdleTimeSeconds
public int maxIdleTimeSeconds() -
distributedEnabled
public boolean distributedEnabled()Whether Raft-replicated backing storage is enabled (seeJCacheDistributedMapAdapter). -
distributedRegistry
Registry used to resolve the backing Raft-replicated map whendistributedEnabled()is true.nullotherwise. -
getKeyType
-
getValueType
-
isStoreByValue
-
isReadThrough
-
isWriteThrough
-
isStatisticsEnabled
-
isManagementEnabled
-
getCacheEntryListenerConfigurations
-
getExpiryPolicyFactory
-
getCacheLoaderFactory
-
getCacheWriterFactory
-
builder
-
builder
-