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-basedCompleteConfiguration
that provides setter methods.CoherenceBasedCache
s that use this configuration must be JCache compliant as JCacheCache
s that useCompleteConfiguration
s are compliant.- Since:
- Coherence 12.1.3
- Author:
- bo 2013.11.12
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cfgListener)
Add a configuration for aCacheEntryListener
.void
setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> factory)
Set theCacheLoader
factory.void
setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> factory)
Set theCacheWriter
factory.void
setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> factory)
Set theFactory
for theExpiryPolicy
.void
setManagementEnabled(boolean fManagementEnabled)
Set if JMX management is enabled for a configuration.void
setReadThrough(boolean fReadThrough)
Set if read-through caching should be used.void
setStatisticsEnabled(boolean fStatisticsEnabled)
Set if statistics gathering is enabled for a configuration.void
setStoreByValue(boolean fStoreByValue)
Set if a configured cache should use store-by-value or store-by-reference semantics.void
setTypes(Class<K> clzKey, Class<V> clzValue)
Sets the expected type of keys and values for aCoherenceBasedCache
.void
setWriteThrough(boolean fWriteThrough)
Set if write-through caching should be used.-
Methods inherited from interface com.tangosol.coherence.jcache.CoherenceBasedConfiguration
createCache, destroyCache
-
-
-
-
Method Detail
-
setTypes
void setTypes(Class<K> clzKey, Class<V> clzValue)
Sets the expected type of keys and values for aCoherenceBasedCache
.Setting both to
Object.class
means 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 theCacheLoader
factory.- Parameters:
factory
- theCacheLoader
Factory
-
setCacheWriterFactory
void setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> factory)
Set theCacheWriter
factory.- Parameters:
factory
- theCacheWriter
Factory
-
setExpiryPolicyFactory
void setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> factory)
Set theFactory
for theExpiryPolicy
.If
null
is specified the defaultExpiryPolicy
is used.- Parameters:
factory
- theExpiryPolicy
Factory
-
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
CacheLoader
Factory
.- Parameters:
fReadThrough
-true
if 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
CacheWriter
Factory
.- Parameters:
fWriteThrough
-true
if 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
-true
for store-by-value semantics,false
for 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
-true
to enable statistics gathering,false
to 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
-true
to enable statistics,false
to disable
-
-