|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.config.CacheConfig<K,V>
com.hazelcast.config.CacheConfigReadOnly<K,V>
K - V - public class CacheConfigReadOnly<K,V>
Contains the configuration for an ICache (read-only).
| Field Summary | |
|---|---|
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 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 Caches configured with this
Configuration. |
protected Set<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> |
listenerConfigurations
The CacheEntryListenerConfigurations for the Configuration. |
protected Class<V> |
valueType
The type of values for Caches configured with this
Configuration. |
| Method Summary | |
|---|---|
CacheConfig<K,V> |
addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
Add a configuration for a CacheEntryListener. |
protected Set<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> |
createConcurrentSet()
|
Iterable<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> |
getCacheEntryListenerConfigurations()
|
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()
Gets the CacheEvictionConfig instance for eviction configuration of the cache config. |
javax.cache.configuration.Factory<javax.cache.expiry.ExpiryPolicy> |
getExpiryPolicyFactory()
|
Class<K> |
getKeyType()
|
NearCacheConfig |
getNearCacheConfig()
Gets the NearCacheConfig of the cache config instance. |
Class<V> |
getValueType()
|
boolean |
isManagementEnabled()
|
boolean |
isReadThrough()
|
boolean |
isStatisticsEnabled()
|
boolean |
isStoreByValue()
|
boolean |
isWriteThrough()
|
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 of cache config. |
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> |
setEvictionConfig(CacheEvictionConfig evictionConfig)
Sets the CacheEvictionConfig instance for eviction configuration of the cache config. |
CacheConfiguration<K,V> |
setExpiryPolicyFactory(javax.cache.configuration.Factory<? extends javax.cache.expiry.ExpiryPolicy> expiryPolicyFactory)
Set the Factory for the ExpiryPolicy. |
CacheConfig<K,V> |
setInMemoryFormat(InMemoryFormat inMemoryFormat)
Data type that will be used for storing records. |
CacheConfig<K,V> |
setManagementEnabled(boolean enabled)
Sets whether management is enabled on a cache. |
CacheConfig<K,V> |
setManagerPrefix(String managerPrefix)
Sets the manager prefix of the cache config. |
CacheConfig<K,V> |
setName(String name)
Sets the name of the cache. |
CacheConfig |
setNearCacheConfig(NearCacheConfig nearCacheConfig)
Sets the NearCacheConfig of the cache config instance. |
CacheConfiguration<K,V> |
setReadThrough(boolean isReadThrough)
Set if read-through caching should be used. |
CacheConfiguration<K,V> |
setStatisticsEnabled(boolean enabled)
Sets whether statistics gathering is enabled on a 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 global identifier of the cache. |
CacheConfiguration<K,V> |
setWriteThrough(boolean isWriteThrough)
Set if write-through caching should be used. |
| Methods inherited from class com.hazelcast.config.CacheConfig |
|---|
equals, getAsReadOnly, getAsyncBackupCount, getBackupCount, getInMemoryFormat, getManagerPrefix, getName, getNameWithPrefix, getTotalBackupCount, getUriString, hashCode, readData, toString, writeData |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Set<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> listenerConfigurations
CacheEntryListenerConfigurations for the Configuration.
protected Class<K> keyType
Caches configured with this
Configuration.
protected Class<V> valueType
Caches 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
| Method Detail |
|---|
public CacheEvictionConfig getEvictionConfig()
CacheConfigCacheEvictionConfig instance for eviction configuration of the cache config.
getEvictionConfig in class CacheConfig<K,V>CacheEvictionConfig instance for eviction configurationpublic CacheConfig<K,V> addCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
CacheEntryListener.
addCacheEntryListenerConfiguration in interface CacheConfiguration<K,V>cacheEntryListenerConfiguration - the CacheEntryListenerConfiguration
CacheConfigpublic CacheConfig<K,V> removeCacheEntryListenerConfiguration(javax.cache.configuration.CacheEntryListenerConfiguration<K,V> cacheEntryListenerConfiguration)
CacheEntryListener.
removeCacheEntryListenerConfiguration in interface CacheConfiguration<K,V>cacheEntryListenerConfiguration - the CacheEntryListenerConfiguration to remove
CacheConfigpublic Iterable<javax.cache.configuration.CacheEntryListenerConfiguration<K,V>> getCacheEntryListenerConfigurations()
getCacheEntryListenerConfigurations in interface javax.cache.configuration.CompleteConfiguration<K,V>public CacheConfig<K,V> setName(String name)
CacheConfig
setName in class CacheConfig<K,V>name - the name of the cache to set
public CacheConfig<K,V> setManagerPrefix(String managerPrefix)
CacheConfig
setManagerPrefix in class CacheConfig<K,V>managerPrefix - the manager prefix of the cache config to set
public CacheConfig<K,V> setUriString(String uriString)
CacheConfig
setUriString in class CacheConfig<K,V>uriString - the URI string of the cache to set
public CacheConfig<K,V> setBackupCount(int backupCount)
CacheConfig
setBackupCount in class CacheConfig<K,V>backupCount - the number of synchronous backups to set
CacheConfig.setAsyncBackupCount(int)public CacheConfig<K,V> setAsyncBackupCount(int asyncBackupCount)
CacheConfig
setAsyncBackupCount in class CacheConfig<K,V>asyncBackupCount - the number of asynchronous backups to set
CacheConfig.setBackupCount(int)public CacheConfig<K,V> setEvictionConfig(CacheEvictionConfig evictionConfig)
CacheConfigCacheEvictionConfig instance for eviction configuration of the cache config.
setEvictionConfig in class CacheConfig<K,V>evictionConfig - the CacheEvictionConfig instance for eviction configuration to set
public CacheConfig setNearCacheConfig(NearCacheConfig nearCacheConfig)
CacheConfigNearCacheConfig of the cache config instance.
setNearCacheConfig in class CacheConfig<K,V>nearCacheConfig - the NearCacheConfig of the cache to set
public CacheConfig<K,V> setInMemoryFormat(InMemoryFormat inMemoryFormat)
CacheConfig
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 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 type
CacheConfigCacheManager.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-reference
CacheConfigpublic NearCacheConfig getNearCacheConfig()
CacheConfigNearCacheConfig of the cache config instance.
getNearCacheConfig in class CacheConfig<K,V>NearCacheConfig of the cache config instancepublic boolean isReadThrough()
isReadThrough in interface javax.cache.configuration.CompleteConfiguration<K,V>public 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
CacheConfiguration to permit fluent-style method callspublic boolean isWriteThrough()
isWriteThrough in interface javax.cache.configuration.CompleteConfiguration<K,V>public 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
CacheConfiguration to permit fluent-style method callspublic boolean isStatisticsEnabled()
isStatisticsEnabled in interface javax.cache.configuration.CompleteConfiguration<K,V>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.
CacheConfigpublic boolean isManagementEnabled()
isManagementEnabled in interface javax.cache.configuration.CompleteConfiguration<K,V>public javax.cache.configuration.Factory<javax.cache.integration.CacheLoader<K,V>> getCacheLoaderFactory()
getCacheLoaderFactory in interface javax.cache.configuration.CompleteConfiguration<K,V>public CacheConfiguration<K,V> setCacheLoaderFactory(javax.cache.configuration.Factory<? extends javax.cache.integration.CacheLoader<K,V>> cacheLoaderFactory)
CacheConfigurationCacheLoader factory.
setCacheLoaderFactory in interface CacheConfiguration<K,V>cacheLoaderFactory - the CacheLoader Factory
CacheConfiguration to permit fluent-style method callspublic 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>expiryPolicyFactory - the ExpiryPolicy 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)
CacheConfigurationCacheWriter factory.
setCacheWriterFactory in interface CacheConfiguration<K,V>cacheWriterFactory - the CacheWriter Factory
CacheConfiguration to permit fluent-style method callspublic 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||