K
- type of the keyV
- type of the valuepublic class CacheConfigReadOnly<K,V> extends CacheConfig<K,V>
CacheConfig
Modifier and Type | Field and Description |
---|---|
protected javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,V>> |
cacheLoaderFactory
The
Factory for the CacheLoader . |
protected javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K,? super V>> |
cacheWriterFactory
The
Factory for the CacheWriter . |
protected javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> |
expiryPolicyFactory
The
Factory for the ExpiryPolicy . |
protected HotRestartConfig |
hotRestartConfig |
protected boolean |
isManagementEnabled
Whether management is enabled
|
protected boolean |
isReadThrough
A flag indicating if "read-through" mode is required.
|
protected boolean |
isStatisticsEnabled
A flag indicating if statistics gathering is enabled.
|
protected boolean |
isStoreByValue
A flag indicating if the cache will be store-by-value or store-by-reference.
|
protected boolean |
isWriteThrough
A flag indicating if "write-through" mode is required.
|
protected Class<K> |
keyType
The type of keys for
Cache s configured with this
Configuration . |
protected Set<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> |
listenerConfigurations
The
CacheEntryListenerConfiguration s for the Configuration . |
protected Class<V> |
valueType
The type of values for
Cache s configured with this
Configuration . |
Modifier and Type | Method and Description |
---|---|
CacheConfig<K,V> |
addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
Deprecated.
Add a configuration for a
CacheEntryListener . |
protected Set<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> |
createConcurrentSet() |
Iterable<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> |
getCacheEntryListenerConfigurations()
Deprecated.
|
javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,V>> |
getCacheLoaderFactory() |
javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K,? super V>> |
getCacheWriterFactory() |
CacheEvictionConfig |
getEvictionConfig()
Deprecated.
Gets the
EvictionConfig instance of the eviction configuration for this ICache . |
javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> |
getExpiryPolicyFactory() |
HotRestartConfig |
getHotRestartConfig()
Gets the
HotRestartConfig for this CacheConfiguration |
Class<K> |
getKeyType() |
String |
getQuorumName()
Deprecated.
Gets the name of the associated quorum if any.
|
Class<V> |
getValueType() |
WanReplicationRef |
getWanReplicationRef()
Deprecated.
|
boolean |
isManagementEnabled() |
boolean |
isReadThrough() |
boolean |
isStatisticsEnabled() |
boolean |
isStoreByValue() |
boolean |
isWriteThrough() |
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 . |
CacheConfiguration<K,V> |
setKeyType(Class<K> keyType) |
CacheConfiguration<K,V> |
setListenerConfigurations() |
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 . |
CacheConfiguration<K,V> |
setValueType(Class<V> valueType) |
CacheConfig<K,V> |
setWanReplicationRef(WanReplicationRef wanReplicationRef)
Deprecated.
|
CacheConfiguration<K,V> |
setWriteThrough(boolean isWriteThrough)
Deprecated.
Set if write-through caching should be used.
|
equals, getAsReadOnly, getAsyncBackupCount, getBackupCount, getInMemoryFormat, getManagerPrefix, getMergePolicy, getName, getNameWithPrefix, getPartitionLostListenerConfigs, getTotalBackupCount, getUriString, hashCode, isDisablePerEntryInvalidationEvents, readData, toString, writeData
protected Set<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> listenerConfigurations
CacheEntryListenerConfiguration
s for the Configuration
.protected Class<K> keyType
Cache
s configured with this
Configuration
.protected Class<V> valueType
Cache
s configured with this
Configuration
.protected javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,V>> cacheLoaderFactory
Factory
for the CacheLoader
.protected javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K,? super V>> cacheWriterFactory
Factory
for the CacheWriter
.protected javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> expiryPolicyFactory
Factory
for the ExpiryPolicy
.protected boolean isReadThrough
protected boolean isWriteThrough
protected boolean isStatisticsEnabled
protected boolean isStoreByValue
protected boolean isManagementEnabled
protected HotRestartConfig hotRestartConfig
public CacheEvictionConfig getEvictionConfig()
CacheConfig
EvictionConfig
instance of the eviction configuration for this ICache
.getEvictionConfig
in class CacheConfig<K,V>
EvictionConfig
instance of the eviction configuration.public 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()
public CacheConfig<K,V> addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
CacheEntryListener
.addCacheEntryListenerConfiguration
in interface CacheConfiguration<K,V>
cacheEntryListenerConfiguration
- the CacheEntryListenerConfiguration
CacheConfig
public CacheConfig<K,V> removeCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
CacheEntryListener
.removeCacheEntryListenerConfiguration
in interface CacheConfiguration<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 configuration.public CacheConfig<K,V> setInMemoryFormat(InMemoryFormat inMemoryFormat)
CacheConfig
ICache
.
Possible values:
BINARY (default): keys and values will be stored as binary data.
OBJECT: values will be stored in their object forms.setInMemoryFormat
in class CacheConfig<K,V>
inMemoryFormat
- the record type to set.public CacheConfig<K,V> setManagementEnabled(boolean enabled)
CacheManager.enableManagement(String, boolean)
.setManagementEnabled
in interface CacheConfiguration<K,V>
enabled
- true to enable statistics, false to disable.CacheConfig
public CacheConfiguration<K,V> setStatisticsEnabled(boolean enabled)
CacheManager.enableStatistics(String, boolean)
.setStatisticsEnabled
in interface CacheConfiguration<K,V>
enabled
- true to enable statistics, false to disable.CacheConfig
public CacheConfig<K,V> setTypes(Class<K> keyType, Class<V> valueType)
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>
keyType
- the expected key typevalueType
- the expected value typeCacheConfig
CacheManager.getCache(String, Class, Class)
public CacheConfig<K,V> setStoreByValue(boolean storeByValue)
setStoreByValue
in interface CacheConfiguration<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 quorum.public CacheConfiguration<K,V> setHotRestartConfig(HotRestartConfig hotRestartConfig)
HotRestartConfig
for this CacheConfiguration
hotRestartConfig
- hot restart configCacheConfiguration
instancepublic CacheConfig<K,V> setPartitionLostListenerConfigs(List<CachePartitionLostListenerConfig> partitionLostListenerConfigs)
CacheConfig
setPartitionLostListenerConfigs
in class CacheConfig<K,V>
partitionLostListenerConfigs
- CachePartitionLostListenerConfig list.public 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>
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>
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>
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>
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>
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 it.public boolean isReadThrough()
isReadThrough
in interface javax.cache.configuration.CompleteConfiguration<K,V>
public boolean isWriteThrough()
isWriteThrough
in interface javax.cache.configuration.CompleteConfiguration<K,V>
public boolean isStatisticsEnabled()
isStatisticsEnabled
in interface javax.cache.configuration.CompleteConfiguration<K,V>
public boolean isManagementEnabled()
isManagementEnabled
in interface javax.cache.configuration.CompleteConfiguration<K,V>
public HotRestartConfig getHotRestartConfig()
HotRestartConfig
for this CacheConfiguration
public javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,V>> getCacheLoaderFactory()
getCacheLoaderFactory
in interface javax.cache.configuration.CompleteConfiguration<K,V>
public javax.cache.configuration.Factory<javax.cache.integration.CacheWriter<? super K,? super V>> getCacheWriterFactory()
getCacheWriterFactory
in interface javax.cache.configuration.CompleteConfiguration<K,V>
public javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> getExpiryPolicyFactory()
getExpiryPolicyFactory
in interface javax.cache.configuration.CompleteConfiguration<K,V>
public Class<K> getKeyType()
getKeyType
in interface javax.cache.configuration.Configuration<K,V>
public Class<V> getValueType()
getValueType
in interface javax.cache.configuration.Configuration<K,V>
public boolean isStoreByValue()
isStoreByValue
in interface javax.cache.configuration.Configuration<K,V>
protected Set<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> createConcurrentSet()
public CacheConfiguration<K,V> setKeyType(Class<K> keyType)
public CacheConfiguration<K,V> setValueType(Class<V> valueType)
public CacheConfiguration<K,V> setListenerConfigurations()
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.