Package com.tangosol.coherence.jcache
Interface CoherenceBasedCompleteConfiguration<K,V>
- Type Parameters:
K- the type of the keysV- the type of the values
- All Superinterfaces:
CoherenceBasedConfiguration<K,,V> javax.cache.configuration.CompleteConfiguration<K,,V> javax.cache.configuration.Configuration<K,,V> Serializable
- All Known Implementing Classes:
AbstractCoherenceBasedCompleteConfiguration,LocalCacheConfiguration,PartitionedCacheConfiguration,RemoteCacheConfiguration
public interface CoherenceBasedCompleteConfiguration<K,V>
extends javax.cache.configuration.CompleteConfiguration<K,V>, CoherenceBasedConfiguration<K,V>
An Coherence-based
CompleteConfiguration that provides
setter methods.
CoherenceBasedCaches that use this configuration must be JCache compliant as
JCache Caches that use CompleteConfigurations are compliant.
- Since:
- Coherence 12.1.3
- Author:
- bo 2013.11.12
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K, V> cfgListener) Add a configuration for aCacheEntryListener.voidsetCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K, V>> factory) Set theCacheLoaderfactory.voidsetCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K, ? super V>> factory) Set theCacheWriterfactory.voidsetExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> factory) Set theFactoryfor theExpiryPolicy.voidsetManagementEnabled(boolean fManagementEnabled) Set if JMX management is enabled for a configuration.voidsetReadThrough(boolean fReadThrough) Set if read-through caching should be used.voidsetStatisticsEnabled(boolean fStatisticsEnabled) Set if statistics gathering is enabled for a configuration.voidsetStoreByValue(boolean fStoreByValue) Set if a configured cache should use store-by-value or store-by-reference semantics.voidSets the expected type of keys and values for aCoherenceBasedCache.voidsetWriteThrough(boolean fWriteThrough) Set if write-through caching should be used.Methods inherited from interface com.tangosol.coherence.jcache.CoherenceBasedConfiguration
createCache, destroyCacheMethods inherited from interface javax.cache.configuration.CompleteConfiguration
getCacheEntryListenerConfigurations, getCacheLoaderFactory, getCacheWriterFactory, getExpiryPolicyFactory, isManagementEnabled, isReadThrough, isStatisticsEnabled, isWriteThroughMethods inherited from interface javax.cache.configuration.Configuration
getKeyType, getValueType, isStoreByValue
-
Method Details
-
setTypes
Sets the expected type of keys and values for aCoherenceBasedCache.Setting both to
Object.classmeans type-safety checks are not required.- Parameters:
clzKey- the expected key typeclzValue- the expected value type- Throws:
NullPointerException- should the key or value type be null
-
addCacheEntryListenerConfiguration
void addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K, V> cfgListener) Add a configuration for aCacheEntryListener.- Parameters:
cfgListener- theCacheEntryListenerConfiguration- Throws:
IllegalArgumentException- if the same CacheEntryListenerConfiguration is used more than once
-
setCacheLoaderFactory
void setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K, V>> factory) Set theCacheLoaderfactory.- Parameters:
factory- theCacheLoaderFactory
-
setCacheWriterFactory
void setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K, ? super V>> factory) Set theCacheWriterfactory.- Parameters:
factory- theCacheWriterFactory
-
setExpiryPolicyFactory
void setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> factory) Set theFactoryfor theExpiryPolicy.If
nullis specified the defaultExpiryPolicyis used.- Parameters:
factory- theExpiryPolicyFactory
-
setReadThrough
void setReadThrough(boolean fReadThrough) Set if read-through caching should be used.It is an invalid configuration to set this to true without specifying a
CacheLoaderFactory.- Parameters:
fReadThrough-trueif read-through is required
-
setWriteThrough
void setWriteThrough(boolean fWriteThrough) Set if write-through caching should be used.It is an invalid configuration to set this to true without specifying a
CacheWriterFactory.- Parameters:
fWriteThrough-trueif write-through is required
-
setStoreByValue
void setStoreByValue(boolean fStoreByValue) Set if a configured cache should use store-by-value or store-by-reference semantics.- Parameters:
fStoreByValue-truefor store-by-value semantics,falsefor store-by-reference semantics
-
setStatisticsEnabled
void setStatisticsEnabled(boolean fStatisticsEnabled) Set if statistics gathering is enabled for a configuration.Statistics may be enabled or disabled at runtime via
CacheManager.enableStatistics(String, boolean).- Parameters:
fStatisticsEnabled-trueto enable statistics gathering,falseto disable
-
setManagementEnabled
void setManagementEnabled(boolean fManagementEnabled) Set if JMX management is enabled for a configuration.Management may be enabled or disabled at runtime via
CacheManager.enableManagement(String, boolean).- Parameters:
fManagementEnabled-trueto enable statistics,falseto disable
-