K
- type of the keyV
- type of the valuepublic class CacheConfigReadOnly<K,V> extends CacheConfig<K,V>
CacheConfig
cacheLoaderFactory, cacheWriterFactory, classLoader, eventJournalConfig, expiryPolicyFactory, hotRestartConfig, isManagementEnabled, isReadThrough, isStatisticsEnabled, isStoreByValue, isWriteThrough, listenerConfigurations, serializationService
Constructor and Description |
---|
CacheConfigReadOnly(CacheConfig config) |
Modifier and Type | Method and Description |
---|---|
CacheConfig<K,V> |
addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
Add a configuration for a
CacheEntryListener . |
Iterable<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> |
getCacheEntryListenerConfigurations() |
EventJournalConfig |
getEventJournalConfig()
Gets the
EventJournalConfig for this CacheConfiguration |
EvictionConfig |
getEvictionConfig()
Gets the
EvictionConfig instance of the eviction configuration for this ICache . |
HotRestartConfig |
getHotRestartConfig()
Gets the
HotRestartConfig for this CacheConfiguration |
String |
getSplitBrainProtectionName()
Gets the name of the associated split brain protection if any.
|
WanReplicationRef |
getWanReplicationRef() |
CacheConfig<K,V> |
removeCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
Remove a configuration for a
CacheEntryListener . |
CacheConfig<K,V> |
setAsyncBackupCount(int asyncBackupCount)
Sets the number of asynchronous backups for this
ICache . |
CacheConfig<K,V> |
setBackupCount(int backupCount)
Sets the number of synchronous backups.
|
CacheConfiguration<K,V> |
setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> cacheLoaderFactory)
Set the
CacheLoader factory. |
CacheConfiguration<K,V> |
setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> cacheWriterFactory)
Set the
CacheWriter factory. |
CacheConfig<K,V> |
setDisablePerEntryInvalidationEvents(boolean disablePerEntryInvalidationEvents)
Sets invalidation events disabled status for per entry.
|
CacheConfiguration<K,V> |
setEventJournalConfig(EventJournalConfig eventJournalConfig)
Sets the
EventJournalConfig for this CacheConfiguration |
CacheConfig<K,V> |
setEvictionConfig(EvictionConfig evictionConfig)
Sets the
EvictionConfig instance for eviction configuration for this ICache . |
CacheConfiguration<K,V> |
setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> expiryPolicyFactory)
Set the
Factory for the ExpiryPolicy . |
CacheConfiguration<K,V> |
setHotRestartConfig(HotRestartConfig hotRestartConfig)
Sets the
HotRestartConfig for this CacheConfiguration |
CacheConfig<K,V> |
setInMemoryFormat(InMemoryFormat inMemoryFormat)
Data type that will be used to store records in this
ICache . |
CacheConfig<K,V> |
setManagementEnabled(boolean enabled)
Sets whether or not management is enabled on this cache.
|
CacheConfig<K,V> |
setManagerPrefix(String managerPrefix)
Sets the manager prefix of the
ICache . |
CacheConfig<K,V> |
setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
Sets the
MergePolicyConfig for this map. |
CacheConfig<K,V> |
setName(String name)
Sets the name of this
ICache . |
CacheConfig<K,V> |
setPartitionLostListenerConfigs(List<CachePartitionLostListenerConfig> partitionLostListenerConfigs)
Sets the WAN target replication reference.
|
CacheConfiguration<K,V> |
setReadThrough(boolean isReadThrough)
Set if read-through caching should be used.
|
CacheConfig<K,V> |
setSplitBrainProtectionName(String splitBrainProtectionName)
Associates this cache configuration to a split brain protection.
|
CacheConfiguration<K,V> |
setStatisticsEnabled(boolean enabled)
Sets whether or not statistics gathering is enabled on this cache.
|
CacheConfig<K,V> |
setStoreByValue(boolean storeByValue)
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)
Sets the expected type of keys and values for a
Cache
configured with this Configuration . |
CacheConfig<K,V> |
setUriString(String uriString)
Sets the URI string, which is the global identifier of the
ICache . |
CacheConfig<K,V> |
setWanReplicationRef(WanReplicationRef wanReplicationRef) |
CacheConfiguration<K,V> |
setWriteThrough(boolean isWriteThrough)
Set if write-through caching should be used.
|
copy, equals, getAsyncBackupCount, getBackupCount, getInMemoryFormat, getManagerPrefix, getMergePolicyConfig, getName, getNameWithPrefix, getPartitionLostListenerConfigs, getProvidedMergeTypes, getTotalBackupCount, getUriString, hashCode, isDisablePerEntryInvalidationEvents, readData, readFactories, readKeyValueTypes, readListenerConfigurations, readTenant, toString, writeData, writeFactories, writeKeyValueTypes, writeListenerConfigurations, writeTenant
createConcurrentSet, getCacheLoaderFactory, getCacheWriterFactory, getExpiryPolicyFactory, getKeyClassName, getKeyType, getListenerConfigurations, getValueClassName, getValueType, hasListenerConfiguration, isManagementEnabled, isReadThrough, isStatisticsEnabled, isStoreByValue, isWriteThrough, keyValueTypesEqual, setClassLoader, setKeyClassName, setKeyType, setListenerConfigurations, setListenerConfigurations, setValueClassName, setValueType
public CacheConfigReadOnly(CacheConfig config)
public EvictionConfig 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>
@Nonnull public HotRestartConfig getHotRestartConfig()
AbstractCacheConfig
HotRestartConfig
for this CacheConfiguration
getHotRestartConfig
in class AbstractCacheConfig<K,V>
@Nonnull public EventJournalConfig getEventJournalConfig()
AbstractCacheConfig
EventJournalConfig
for this CacheConfiguration
getEventJournalConfig
in class AbstractCacheConfig<K,V>
public String getSplitBrainProtectionName()
CacheConfig
getSplitBrainProtectionName
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> setSplitBrainProtectionName(String splitBrainProtectionName)
CacheConfig
setSplitBrainProtectionName
in class CacheConfig<K,V>
splitBrainProtectionName
- name of the desired split brain protectionpublic CacheConfiguration<K,V> setHotRestartConfig(@Nonnull 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 CacheConfig<K,V> setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
CacheConfig
MergePolicyConfig
for this map.setMergePolicyConfig
in class CacheConfig<K,V>
public 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> setEventJournalConfig(@Nonnull EventJournalConfig eventJournalConfig)
AbstractCacheConfig
EventJournalConfig
for this CacheConfiguration
setEventJournalConfig
in class AbstractCacheConfig<K,V>
eventJournalConfig
- event journal configCacheConfiguration
instancepublic 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 CacheConfig<K,V> setDisablePerEntryInvalidationEvents(boolean disablePerEntryInvalidationEvents)
CacheConfig
setDisablePerEntryInvalidationEvents
in class CacheConfig<K,V>
disablePerEntryInvalidationEvents
- disables invalidation event sending behaviour if it is true
,
otherwise enables itCopyright © 2019 Hazelcast, Inc.. All rights reserved.