K - type of the keyV - type of the valuepublic class CacheConfigReadOnly<K,V> extends CacheConfig<K,V>
CacheConfigcacheLoaderFactory, 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, writeTenantcreateConcurrentSet, getCacheLoaderFactory, getCacheWriterFactory, getExpiryPolicyFactory, getKeyClassName, getKeyType, getListenerConfigurations, getValueClassName, getValueType, hasListenerConfiguration, isManagementEnabled, isReadThrough, isStatisticsEnabled, isStoreByValue, isWriteThrough, keyValueTypesEqual, setClassLoader, setKeyClassName, setKeyType, setListenerConfigurations, setListenerConfigurations, setValueClassName, setValueTypepublic CacheConfigReadOnly(CacheConfig config)
public EvictionConfig getEvictionConfig()
CacheConfigEvictionConfig 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()
AbstractCacheConfigHotRestartConfig for this CacheConfigurationgetHotRestartConfig in class AbstractCacheConfig<K,V>@Nonnull public EventJournalConfig getEventJournalConfig()
AbstractCacheConfigEventJournalConfig for this CacheConfigurationgetEventJournalConfig in class AbstractCacheConfig<K,V>public String getSplitBrainProtectionName()
CacheConfiggetSplitBrainProtectionName 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)
AbstractCacheConfigCacheEntryListener.addCacheEntryListenerConfiguration in interface CacheConfiguration<K,V>addCacheEntryListenerConfiguration in class AbstractCacheConfig<K,V>cacheEntryListenerConfiguration - the CacheEntryListenerConfigurationCacheConfigpublic CacheConfig<K,V> removeCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
AbstractCacheConfigCacheEntryListener.removeCacheEntryListenerConfiguration in interface CacheConfiguration<K,V>removeCacheEntryListenerConfiguration in class AbstractCacheConfig<K,V>cacheEntryListenerConfiguration - the CacheEntryListenerConfiguration to removeCacheConfigpublic CacheConfig<K,V> setName(String name)
CacheConfigICache.setName in class CacheConfig<K,V>name - the name to set for this ICachepublic CacheConfig<K,V> setManagerPrefix(String managerPrefix)
CacheConfigICache.setManagerPrefix in class CacheConfig<K,V>managerPrefix - the manager prefix to set for this ICachepublic CacheConfig<K,V> setUriString(String uriString)
CacheConfigICache.setUriString in class CacheConfig<K,V>uriString - the URI string to set for this ICachepublic CacheConfig<K,V> setBackupCount(int backupCount)
CacheConfigsetBackupCount in class CacheConfig<K,V>backupCount - the number of synchronous backups to set for this ICacheCacheConfig.setAsyncBackupCount(int)public CacheConfig<K,V> setAsyncBackupCount(int asyncBackupCount)
CacheConfigICache.setAsyncBackupCount in class CacheConfig<K,V>asyncBackupCount - the number of asynchronous backups to set for this ICacheCacheConfig.setBackupCount(int),
CacheConfig.getAsyncBackupCount()public CacheConfig<K,V> setEvictionConfig(EvictionConfig evictionConfig)
CacheConfigEvictionConfig 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)
CacheConfigICache.
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 disableCacheConfigpublic 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 disableCacheConfigpublic CacheConfig<K,V> setTypes(Class<K> keyType, Class<V> valueType)
AbstractCacheConfigCache
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 typeCacheConfigCacheManager.getCache(String, Class, Class)public CacheConfig<K,V> setStoreByValue(boolean storeByValue)
AbstractCacheConfigsetStoreByValue in interface CacheConfiguration<K,V>setStoreByValue in class AbstractCacheConfig<K,V>storeByValue - true if store-by-value is required,
false for store-by-referenceCacheConfigpublic CacheConfig<K,V> setWanReplicationRef(WanReplicationRef wanReplicationRef)
setWanReplicationRef in class CacheConfig<K,V>public CacheConfig<K,V> setSplitBrainProtectionName(String splitBrainProtectionName)
CacheConfigsetSplitBrainProtectionName in class CacheConfig<K,V>splitBrainProtectionName - name of the desired split brain protectionpublic CacheConfiguration<K,V> setHotRestartConfig(@Nonnull HotRestartConfig hotRestartConfig)
AbstractCacheConfigHotRestartConfig for this CacheConfigurationsetHotRestartConfig in class AbstractCacheConfig<K,V>hotRestartConfig - hot restart configCacheConfiguration instancepublic CacheConfig<K,V> setPartitionLostListenerConfigs(List<CachePartitionLostListenerConfig> partitionLostListenerConfigs)
CacheConfigsetPartitionLostListenerConfigs in class CacheConfig<K,V>partitionLostListenerConfigs - CachePartitionLostListenerConfig listpublic CacheConfig<K,V> setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
CacheConfigMergePolicyConfig for this map.setMergePolicyConfig in class CacheConfig<K,V>public CacheConfiguration<K,V> setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> expiryPolicyFactory)
CacheConfigurationFactory 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 FactoryCacheConfiguration to permit fluent-style method callspublic CacheConfiguration<K,V> setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> cacheLoaderFactory)
CacheConfigurationCacheLoader factory.setCacheLoaderFactory in interface CacheConfiguration<K,V>setCacheLoaderFactory in class AbstractCacheConfig<K,V>cacheLoaderFactory - the CacheLoader FactoryCacheConfiguration to permit fluent-style method callspublic CacheConfiguration<K,V> setCacheWriterFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheWriter<? super K,? super V>> cacheWriterFactory)
CacheConfigurationCacheWriter factory.setCacheWriterFactory in interface CacheConfiguration<K,V>setCacheWriterFactory in class AbstractCacheConfig<K,V>cacheWriterFactory - the CacheWriter FactoryCacheConfiguration to permit fluent-style method callspublic CacheConfiguration<K,V> setEventJournalConfig(@Nonnull EventJournalConfig eventJournalConfig)
AbstractCacheConfigEventJournalConfig for this CacheConfigurationsetEventJournalConfig 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)
CacheConfigsetDisablePerEntryInvalidationEvents in class CacheConfig<K,V>disablePerEntryInvalidationEvents - disables invalidation event sending behaviour if it is true,
otherwise enables itCopyright © 2019 Hazelcast, Inc.. All rights reserved.