K
- type of the keyV
- type of the valuepublic class CacheConfigReadOnly<K,V> extends CacheConfig<K,V>
CacheConfig
cacheLoaderFactory, cacheWriterFactory, classLoader, expiryPolicyFactory, hotRestartConfig, isManagementEnabled, isReadThrough, isStatisticsEnabled, isStoreByValue, isWriteThrough, listenerConfigurations, serializationService
Modifier and Type | Method and Description |
---|---|
CacheConfig<K,V> |
addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
Deprecated.
Add a configuration for a
CacheEntryListener . |
Iterable<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> |
getCacheEntryListenerConfigurations()
Deprecated.
|
CacheEvictionConfig |
getEvictionConfig()
Deprecated.
Gets the
EvictionConfig instance of the eviction configuration for this ICache . |
String |
getQuorumName()
Deprecated.
Gets the name of the associated quorum if any.
|
WanReplicationRef |
getWanReplicationRef()
Deprecated.
|
CacheConfig<K,V> |
removeCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
Deprecated.
Remove a configuration for a
CacheEntryListener . |
CacheConfig<K,V> |
setAsyncBackupCount(int asyncBackupCount)
Deprecated.
Sets the number of asynchronous backups for this
ICache . |
CacheConfig<K,V> |
setBackupCount(int backupCount)
Deprecated.
Sets the number of synchronous backups.
|
CacheConfiguration<K,V> |
setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> cacheLoaderFactory)
Deprecated.
Set the
CacheLoader factory. |
CacheConfiguration<K,V> |
setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> cacheWriterFactory)
Deprecated.
Set the
CacheWriter factory. |
void |
setDisablePerEntryInvalidationEvents(boolean disablePerEntryInvalidationEvents)
Deprecated.
Sets invalidation events disabled status for per entry.
|
CacheConfig<K,V> |
setEvictionConfig(EvictionConfig evictionConfig)
Deprecated.
Sets the
EvictionConfig instance for eviction configuration for this ICache . |
CacheConfiguration<K,V> |
setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> expiryPolicyFactory)
Deprecated.
Set the
Factory for the ExpiryPolicy . |
CacheConfiguration<K,V> |
setHotRestartConfig(HotRestartConfig hotRestartConfig)
Deprecated.
Sets the
HotRestartConfig for this CacheConfiguration |
CacheConfig<K,V> |
setInMemoryFormat(InMemoryFormat inMemoryFormat)
Deprecated.
Data type that will be used to store records in this
ICache . |
CacheConfig<K,V> |
setManagementEnabled(boolean enabled)
Deprecated.
Sets whether or not management is enabled on this cache.
|
CacheConfig<K,V> |
setManagerPrefix(String managerPrefix)
Deprecated.
Sets the manager prefix of the
ICache . |
void |
setMergePolicy(String mergePolicy)
Deprecated.
Sets the class name of
CacheMergePolicy implementation to this cache config. |
CacheConfig<K,V> |
setName(String name)
Deprecated.
Sets the name of this
ICache . |
CacheConfig<K,V> |
setPartitionLostListenerConfigs(List<CachePartitionLostListenerConfig> partitionLostListenerConfigs)
Deprecated.
Sets the WAN target replication reference.
|
CacheConfig<K,V> |
setQuorumName(String quorumName)
Deprecated.
Associates this cache configuration to a quorum.
|
CacheConfiguration<K,V> |
setReadThrough(boolean isReadThrough)
Deprecated.
Set if read-through caching should be used.
|
CacheConfiguration<K,V> |
setStatisticsEnabled(boolean enabled)
Deprecated.
Sets whether or not statistics gathering is enabled on this cache.
|
CacheConfig<K,V> |
setStoreByValue(boolean storeByValue)
Deprecated.
Set if a configured cache should use store-by-value or store-by-reference
semantics.
|
CacheConfig<K,V> |
setTypes(Class<K> keyType,
Class<V> valueType)
Deprecated.
Sets the expected type of keys and values for a
Cache
configured with this Configuration . |
CacheConfig<K,V> |
setUriString(String uriString)
Deprecated.
Sets the URI string, which is the global identifier of the
ICache . |
CacheConfig<K,V> |
setWanReplicationRef(WanReplicationRef wanReplicationRef)
Deprecated.
|
CacheConfiguration<K,V> |
setWriteThrough(boolean isWriteThrough)
Deprecated.
Set if write-through caching should be used.
|
copy, equals, getAsReadOnly, getAsyncBackupCount, getBackupCount, getInMemoryFormat, getManagerPrefix, getMergePolicy, getName, getNameWithPrefix, getPartitionLostListenerConfigs, getProvidedMergeTypes, getTotalBackupCount, getUriString, hashCode, isDisablePerEntryInvalidationEvents, readData, readFactories, readKeyValueTypes, readListenerConfigurations, toString, writeData, writeFactories, writeKeyValueTypes, writeListenerConfigurations
createConcurrentSet, getCacheLoaderFactory, getCacheWriterFactory, getExpiryPolicyFactory, getHotRestartConfig, getKeyClassName, getKeyType, getListenerConfigurations, getValueClassName, getValueType, hasListenerConfiguration, isManagementEnabled, isReadThrough, isStatisticsEnabled, isStoreByValue, isWriteThrough, keyValueTypesEqual, setClassLoader, setKeyClassName, setKeyType, setListenerConfigurations, setListenerConfigurations, setValueClassName, setValueType
public CacheEvictionConfig getEvictionConfig()
CacheConfig
EvictionConfig
instance of the eviction configuration for this ICache
.getEvictionConfig
in class CacheConfig<K,V>
EvictionConfig
instance of the eviction configurationpublic WanReplicationRef getWanReplicationRef()
getWanReplicationRef
in class CacheConfig<K,V>
public String getQuorumName()
CacheConfig
getQuorumName
in class CacheConfig<K,V>
public Iterable<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> getCacheEntryListenerConfigurations()
getCacheEntryListenerConfigurations
in interface javax.cache.configuration.CompleteConfiguration<K,V>
getCacheEntryListenerConfigurations
in class AbstractCacheConfig<K,V>
public CacheConfig<K,V> addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
AbstractCacheConfig
CacheEntryListener
.addCacheEntryListenerConfiguration
in interface CacheConfiguration<K,V>
addCacheEntryListenerConfiguration
in class AbstractCacheConfig<K,V>
cacheEntryListenerConfiguration
- the CacheEntryListenerConfiguration
CacheConfig
public CacheConfig<K,V> removeCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
AbstractCacheConfig
CacheEntryListener
.removeCacheEntryListenerConfiguration
in interface CacheConfiguration<K,V>
removeCacheEntryListenerConfiguration
in class AbstractCacheConfig<K,V>
cacheEntryListenerConfiguration
- the CacheEntryListenerConfiguration
to removeCacheConfig
public CacheConfig<K,V> setName(String name)
CacheConfig
ICache
.setName
in class CacheConfig<K,V>
name
- the name to set for this ICache
public CacheConfig<K,V> setManagerPrefix(String managerPrefix)
CacheConfig
ICache
.setManagerPrefix
in class CacheConfig<K,V>
managerPrefix
- the manager prefix to set for this ICache
public CacheConfig<K,V> setUriString(String uriString)
CacheConfig
ICache
.setUriString
in class CacheConfig<K,V>
uriString
- the URI string to set for this ICache
public CacheConfig<K,V> setBackupCount(int backupCount)
CacheConfig
setBackupCount
in class CacheConfig<K,V>
backupCount
- the number of synchronous backups to set for this ICache
CacheConfig.setAsyncBackupCount(int)
public CacheConfig<K,V> setAsyncBackupCount(int asyncBackupCount)
CacheConfig
ICache
.setAsyncBackupCount
in class CacheConfig<K,V>
asyncBackupCount
- the number of asynchronous backups to set for this ICache
CacheConfig.setBackupCount(int)
,
CacheConfig.getAsyncBackupCount()
public CacheConfig<K,V> setEvictionConfig(EvictionConfig evictionConfig)
CacheConfig
EvictionConfig
instance for eviction configuration for this ICache
.setEvictionConfig
in class CacheConfig<K,V>
evictionConfig
- the EvictionConfig
instance to set for the eviction configurationpublic CacheConfig<K,V> setInMemoryFormat(InMemoryFormat inMemoryFormat)
CacheConfig
ICache
.
Possible values:
setInMemoryFormat
in class CacheConfig<K,V>
inMemoryFormat
- the record type to setpublic CacheConfig<K,V> setManagementEnabled(boolean enabled)
AbstractCacheConfig
Management may be enabled or disabled at runtime via CacheManager.enableManagement(String, boolean)
.
setManagementEnabled
in interface CacheConfiguration<K,V>
setManagementEnabled
in class AbstractCacheConfig<K,V>
enabled
- true
to enable statistics, false
to disableCacheConfig
public CacheConfiguration<K,V> setStatisticsEnabled(boolean enabled)
AbstractCacheConfig
Statistics may be enabled or disabled at runtime via CacheManager.enableStatistics(String, boolean)
.
setStatisticsEnabled
in interface CacheConfiguration<K,V>
setStatisticsEnabled
in class AbstractCacheConfig<K,V>
enabled
- true
to enable statistics, false
to disableCacheConfig
public CacheConfig<K,V> setTypes(Class<K> keyType, Class<V> valueType)
AbstractCacheConfig
Cache
configured with this Configuration
.
Setting both to Object.class
means type-safety checks are not required.
This is used by CacheManager
to ensure that the key and value
types are the same as those configured for the Cache
prior to
returning a requested cache from this method.
Implementations may further perform type checking on mutative cache operations
and throw a ClassCastException
if these checks fail.
setTypes
in interface CacheConfiguration<K,V>
setTypes
in class AbstractCacheConfig<K,V>
keyType
- the expected key typevalueType
- the expected value typeCacheConfig
CacheManager.getCache(String, Class, Class)
public CacheConfig<K,V> setStoreByValue(boolean storeByValue)
AbstractCacheConfig
setStoreByValue
in interface CacheConfiguration<K,V>
setStoreByValue
in class AbstractCacheConfig<K,V>
storeByValue
- true
if store-by-value is required,
false
for store-by-referenceCacheConfig
public CacheConfig<K,V> setWanReplicationRef(WanReplicationRef wanReplicationRef)
setWanReplicationRef
in class CacheConfig<K,V>
public CacheConfig<K,V> setQuorumName(String quorumName)
CacheConfig
setQuorumName
in class CacheConfig<K,V>
quorumName
- name of the desired quorumpublic CacheConfiguration<K,V> setHotRestartConfig(HotRestartConfig hotRestartConfig)
AbstractCacheConfig
HotRestartConfig
for this CacheConfiguration
setHotRestartConfig
in class AbstractCacheConfig<K,V>
hotRestartConfig
- hot restart configCacheConfiguration
instancepublic CacheConfig<K,V> setPartitionLostListenerConfigs(List<CachePartitionLostListenerConfig> partitionLostListenerConfigs)
CacheConfig
setPartitionLostListenerConfigs
in class CacheConfig<K,V>
partitionLostListenerConfigs
- CachePartitionLostListenerConfig listpublic void setMergePolicy(String mergePolicy)
CacheConfig
CacheMergePolicy
implementation to this cache config.setMergePolicy
in class CacheConfig<K,V>
mergePolicy
- the class name of CacheMergePolicy
implementation to be set to this cache
configpublic CacheConfiguration<K,V> setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> expiryPolicyFactory)
CacheConfiguration
Factory
for the ExpiryPolicy
.
If null
is specified the default ExpiryPolicy
is used.setExpiryPolicyFactory
in interface CacheConfiguration<K,V>
setExpiryPolicyFactory
in class AbstractCacheConfig<K,V>
expiryPolicyFactory
- the ExpiryPolicy
Factory
CacheConfiguration
to permit fluent-style method callspublic CacheConfiguration<K,V> setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> cacheLoaderFactory)
CacheConfiguration
CacheLoader
factory.setCacheLoaderFactory
in interface CacheConfiguration<K,V>
setCacheLoaderFactory
in class AbstractCacheConfig<K,V>
cacheLoaderFactory
- the CacheLoader
Factory
CacheConfiguration
to permit fluent-style method callspublic CacheConfiguration<K,V> setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> cacheWriterFactory)
CacheConfiguration
CacheWriter
factory.setCacheWriterFactory
in interface CacheConfiguration<K,V>
setCacheWriterFactory
in class AbstractCacheConfig<K,V>
cacheWriterFactory
- the CacheWriter
Factory
CacheConfiguration
to permit fluent-style method callspublic CacheConfiguration<K,V> setWriteThrough(boolean isWriteThrough)
CacheConfiguration
It is an invalid configuration to set this to true
without specifying a
CacheWriter
Factory
.
setWriteThrough
in interface CacheConfiguration<K,V>
setWriteThrough
in class AbstractCacheConfig<K,V>
isWriteThrough
- true
if write-through is required, false
otherwiseCacheConfiguration
to permit fluent-style method callspublic CacheConfiguration<K,V> setReadThrough(boolean isReadThrough)
CacheConfiguration
It is an invalid configuration to set this to true
without specifying a
CacheLoader
Factory
.
setReadThrough
in interface CacheConfiguration<K,V>
setReadThrough
in class AbstractCacheConfig<K,V>
isReadThrough
- true
if read-through is required, false
otherwiseCacheConfiguration
to permit fluent-style method callspublic void setDisablePerEntryInvalidationEvents(boolean disablePerEntryInvalidationEvents)
CacheConfig
setDisablePerEntryInvalidationEvents
in class CacheConfig<K,V>
disablePerEntryInvalidationEvents
- disables invalidation event sending behaviour if it is true
,
otherwise enables itCopyright © 2018 Hazelcast, Inc.. All rights reserved.