public class CacheSimpleConfig extends Object implements IdentifiedDataSerializable, NamedConfig
| Modifier and Type | Class and Description | 
|---|---|
| static class  | CacheSimpleConfig.ExpiryPolicyFactoryConfigRepresents configuration for "ExpiryPolicyFactory". | 
| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULT_BACKUP_COUNTThe default number of backups. | 
| static InMemoryFormat | DEFAULT_IN_MEMORY_FORMATDefault InMemory Format. | 
| static int | MAX_BACKUP_COUNTThe maximum number of backups. | 
| static int | MIN_BACKUP_COUNTThe minimum number of backups. | 
| Constructor and Description | 
|---|
| CacheSimpleConfig() | 
| CacheSimpleConfig(CacheSimpleConfig cacheSimpleConfig) | 
| CacheSimpleConfig(String name)Create a Cache Simple Config for a cache with a specific name. | 
| Modifier and Type | Method and Description | 
|---|---|
| CacheSimpleConfig | addCachePartitionLostListenerConfig(CachePartitionLostListenerConfig listenerConfig)Adds the CachePartitionLostListenerConfig to partitionLostListenerConfigs. | 
| CacheSimpleConfig | addEntryListenerConfig(CacheSimpleEntryListenerConfig listenerConfig)Adds  CacheSimpleEntryListenerConfigto thisICache. | 
| boolean | equals(Object o) | 
| int | getAsyncBackupCount()Gets the number of asynchronous backups for this  ICache. | 
| int | getBackupCount()Gets the number of synchronous backups for this  ICache. | 
| List<CacheSimpleEntryListenerConfig> | getCacheEntryListeners()Gets a list of  CacheSimpleEntryListenerConfigfrom thisICache. | 
| String | getCacheLoader()Get classname of a class to be used as  CacheLoader. | 
| String | getCacheLoaderFactory()Gets the factory for the  CacheLoader. | 
| String | getCacheWriter()Get classname of a class to be used as  CacheWriter. | 
| String | getCacheWriterFactory()Gets the factory for the  CacheWriter. | 
| int | getClassId()Returns type identifier for this class. | 
| EventJournalConfig | getEventJournalConfig()Gets the  EventJournalConfigfor thisCacheSimpleConfig | 
| EvictionConfig | getEvictionConfig()Gets the eviction configuration for this  ICache. | 
| CacheSimpleConfig.ExpiryPolicyFactoryConfig | getExpiryPolicyFactoryConfig()Gets the factory configuration for the  ExpiryPolicy. | 
| int | getFactoryId()Returns DataSerializableFactory factory ID for this class. | 
| HotRestartConfig | getHotRestartConfig()Gets the  HotRestartConfigfor thisCacheSimpleConfig | 
| InMemoryFormat | getInMemoryFormat()Gets the InMemory Format for this  ICache. | 
| String | getKeyType()Gets the key type for this  ICache. | 
| MergePolicyConfig | getMergePolicyConfig()Gets the  MergePolicyConfigfor this map. | 
| String | getName()Gets the name of this  ICache. | 
| List<CachePartitionLostListenerConfig> | getPartitionLostListenerConfigs()Gets the partition lost listener references added to cache configuration. | 
| String | getSplitBrainProtectionName()Gets the name of the associated split brain protection if any. | 
| String | getValueType()Gets the value type for this  ICache. | 
| WanReplicationRef | getWanReplicationRef()Gets the WAN target replication reference. | 
| int | hashCode() | 
| boolean | isDisablePerEntryInvalidationEvents()Returns invalidation events disabled status for per entry. | 
| boolean | isManagementEnabled()Checks if management is enabled for this  ICache. | 
| boolean | isReadThrough()Checks if this  ICacheis read-through: a read loads the entry from the data store
 if it is not already in the cache. | 
| boolean | isStatisticsEnabled()Checks if statistics are enabled for this  ICache. | 
| boolean | isWriteThrough()Checks if the  ICacheis write-through: a write to the queue also loads the entry
 into the data store. | 
| void | readData(ObjectDataInput in)Reads fields from the input stream | 
| CacheSimpleConfig | setAsyncBackupCount(int asyncBackupCount)Sets the number of asynchronous backups for this  ICache. | 
| CacheSimpleConfig | setBackupCount(int backupCount)Sets the number of synchronous backups for this  ICache. | 
| CacheSimpleConfig | setCacheEntryListeners(List<CacheSimpleEntryListenerConfig> cacheEntryListeners)Sets a list of  CacheSimpleEntryListenerConfigfor thisICache. | 
| CacheSimpleConfig | setCacheLoader(String cacheLoader)Set classname of a class to be used as  CacheLoader. | 
| CacheSimpleConfig | setCacheLoaderFactory(String cacheLoaderFactory)Sets the factory for this  CacheLoader. | 
| CacheSimpleConfig | setCacheWriter(String cacheWriter)Set classname of a class to be used as  CacheWriter. | 
| CacheSimpleConfig | setCacheWriterFactory(String cacheWriterFactory)Sets the factory for this  CacheWriter. | 
| CacheSimpleConfig | setDisablePerEntryInvalidationEvents(boolean disablePerEntryInvalidationEvents)Sets invalidation events disabled status for per entry. | 
| CacheSimpleConfig | setEventJournalConfig(EventJournalConfig eventJournalConfig)Sets the  EventJournalConfigfor thisCacheSimpleConfig | 
| CacheSimpleConfig | setEvictionConfig(EvictionConfig evictionConfig)Sets the eviction configuration for this  ICache. | 
| CacheSimpleConfig | setExpiryPolicyFactory(String className)Sets the factory for this  ExpiryPolicy. | 
| CacheSimpleConfig | setExpiryPolicyFactoryConfig(CacheSimpleConfig.ExpiryPolicyFactoryConfig expiryPolicyFactoryConfig)Sets the factory configuration for this  ExpiryPolicy. | 
| CacheSimpleConfig | setHotRestartConfig(HotRestartConfig hotRestartConfig)Sets the  HotRestartConfigfor thisCacheSimpleConfig | 
| CacheSimpleConfig | setInMemoryFormat(InMemoryFormat inMemoryFormat)Sets the InMemory Format for this  ICache. | 
| CacheSimpleConfig | setKeyType(String keyType)Sets the key type for this  ICache. | 
| CacheSimpleConfig | setManagementEnabled(boolean managementEnabled)Sets management to enabled or disabled for this  ICache. | 
| CacheSimpleConfig | setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)Sets the  MergePolicyConfigfor this map. | 
| CacheSimpleConfig | setName(String name)Sets the name of this  ICache. | 
| CacheSimpleConfig | setPartitionLostListenerConfigs(List<CachePartitionLostListenerConfig> partitionLostListenerConfigs)Sets the PartitionLostListenerConfigs. | 
| CacheSimpleConfig | setReadThrough(boolean readThrough)Enables or disables read-through: a read loads the entry from the data store if it is not already in the cache. | 
| CacheSimpleConfig | setSplitBrainProtectionName(String splitBrainProtectionName)Associates this cache configuration to a split brain protection. | 
| CacheSimpleConfig | setStatisticsEnabled(boolean statisticsEnabled)Sets statistics to enabled or disabled for this  ICache. | 
| CacheSimpleConfig | setValueType(String valueType)Sets the value type for this  ICache. | 
| CacheSimpleConfig | setWanReplicationRef(WanReplicationRef wanReplicationRef)Sets the WAN target replication reference. | 
| CacheSimpleConfig | setWriteThrough(boolean writeThrough)Enables or disables write-through for this  ICache: a write to the queue also loads
 the entry into the data store. | 
| String | toString() | 
| void | writeData(ObjectDataOutput out)Writes object fields to output stream | 
public static final int MIN_BACKUP_COUNT
public static final int MAX_BACKUP_COUNT
public static final int DEFAULT_BACKUP_COUNT
public static final InMemoryFormat DEFAULT_IN_MEMORY_FORMAT
public CacheSimpleConfig(CacheSimpleConfig cacheSimpleConfig)
public CacheSimpleConfig(String name)
name - cache namepublic CacheSimpleConfig()
public String getName()
ICache.getName in interface NamedConfigICachepublic CacheSimpleConfig setName(String name)
ICache.setName in interface NamedConfigname - the name to set for this ICachepublic CacheSimpleConfig setKeyType(String keyType)
ICache.keyType - the key type to set for this ICachepublic String getValueType()
ICache.ICachepublic CacheSimpleConfig setValueType(String valueType)
ICache.valueType - the value type to set for this ICachepublic boolean isStatisticsEnabled()
ICache.true if statistics are enabled, false otherwisepublic CacheSimpleConfig setStatisticsEnabled(boolean statisticsEnabled)
ICache.statisticsEnabled - true to enable cache statistics, false to disablepublic boolean isManagementEnabled()
ICache.true if cache management is enabled, false otherwisepublic CacheSimpleConfig setManagementEnabled(boolean managementEnabled)
ICache.managementEnabled - true to enable cache management, false to disablepublic boolean isReadThrough()
ICache is read-through: a read loads the entry from the data store
 if it is not already in the cache.true if the cache is read-through, false otherwisepublic CacheSimpleConfig setReadThrough(boolean readThrough)
readThrough - true to enable read-through for this ICache,
                    false to disablepublic boolean isWriteThrough()
ICache is write-through: a write to the queue also loads the entry
 into the data store.true if the cache is write-through, false otherwisepublic CacheSimpleConfig setWriteThrough(boolean writeThrough)
ICache: a write to the queue also loads
 the entry into the data store.writeThrough - true to enable write-through, false to disablepublic String getCacheLoaderFactory()
CacheLoader.CacheLoaderpublic CacheSimpleConfig setCacheLoaderFactory(String cacheLoaderFactory)
CacheLoader.cacheLoaderFactory - the factory to set for this CacheLoaderpublic String getCacheLoader()
CacheLoader.CacheLoaderpublic CacheSimpleConfig setCacheLoader(String cacheLoader)
CacheLoader.cacheLoader - classname to be used as CacheLoaderpublic String getCacheWriterFactory()
CacheWriter.CacheWriterpublic CacheSimpleConfig setCacheWriterFactory(String cacheWriterFactory)
CacheWriter.cacheWriterFactory - the factory to set for this CacheWriterpublic String getCacheWriter()
CacheWriter.CacheWriterpublic CacheSimpleConfig setCacheWriter(String cacheWriter)
CacheWriter.cacheWriter - classname to be used as CacheWriterpublic CacheSimpleConfig.ExpiryPolicyFactoryConfig getExpiryPolicyFactoryConfig()
ExpiryPolicy.ExpiryPolicypublic CacheSimpleConfig setExpiryPolicyFactoryConfig(CacheSimpleConfig.ExpiryPolicyFactoryConfig expiryPolicyFactoryConfig)
ExpiryPolicy.expiryPolicyFactoryConfig - the factory configuration to set for this ExpiryPolicypublic CacheSimpleConfig setExpiryPolicyFactory(String className)
ExpiryPolicy.className - the factory to set for this ExpiryPolicypublic CacheSimpleConfig addEntryListenerConfig(CacheSimpleEntryListenerConfig listenerConfig)
CacheSimpleEntryListenerConfig to this ICache.CacheSimpleConfig instancepublic List<CacheSimpleEntryListenerConfig> getCacheEntryListeners()
CacheSimpleEntryListenerConfig from this ICache.CacheSimpleEntryListenerConfigpublic CacheSimpleConfig setCacheEntryListeners(List<CacheSimpleEntryListenerConfig> cacheEntryListeners)
CacheSimpleEntryListenerConfig for this ICache.cacheEntryListeners - list of CacheSimpleEntryListenerConfigCacheSimpleConfig instancepublic int getAsyncBackupCount()
ICache.ICachepublic CacheSimpleConfig setAsyncBackupCount(int asyncBackupCount)
ICache.asyncBackupCount - the number of asynchronous synchronous backups to setIllegalArgumentException - if asyncBackupCount smaller than 0,
                                  or larger than the maximum number of backups,
                                  or the sum of the backups and async backups is larger than the maximum number of backupssetBackupCount(int), 
getAsyncBackupCount()public int getBackupCount()
ICache.public CacheSimpleConfig setBackupCount(int backupCount)
ICache.backupCount - the new backupCountIllegalArgumentException - if backupCount smaller than 0,
                                  or larger than the maximum number of backup
                                  or the sum of the backups and async backups is larger
                                  than the maximum number of backupspublic InMemoryFormat getInMemoryFormat()
ICache.public CacheSimpleConfig setInMemoryFormat(InMemoryFormat inMemoryFormat)
ICache.inMemoryFormat - the InMemory Formatpublic EvictionConfig getEvictionConfig()
ICache.public CacheSimpleConfig setEvictionConfig(EvictionConfig evictionConfig)
ICache.evictionConfig - the eviction configuration to setpublic WanReplicationRef getWanReplicationRef()
public CacheSimpleConfig setWanReplicationRef(WanReplicationRef wanReplicationRef)
wanReplicationRef - the WAN target replication referencepublic List<CachePartitionLostListenerConfig> getPartitionLostListenerConfigs()
public CacheSimpleConfig setPartitionLostListenerConfigs(List<CachePartitionLostListenerConfig> partitionLostListenerConfigs)
partitionLostListenerConfigs - CachePartitionLostListenerConfig listpublic CacheSimpleConfig addCachePartitionLostListenerConfig(CachePartitionLostListenerConfig listenerConfig)
listenerConfig - CachePartitionLostListenerConfig to be addedpublic String getSplitBrainProtectionName()
public CacheSimpleConfig setSplitBrainProtectionName(String splitBrainProtectionName)
splitBrainProtectionName - name of the desired split brain protectionpublic MergePolicyConfig getMergePolicyConfig()
MergePolicyConfig for this map.MergePolicyConfig for this mappublic CacheSimpleConfig setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
MergePolicyConfig for this map.public HotRestartConfig getHotRestartConfig()
HotRestartConfig for this CacheSimpleConfigpublic CacheSimpleConfig setHotRestartConfig(HotRestartConfig hotRestartConfig)
HotRestartConfig for this CacheSimpleConfighotRestartConfig - hot restart configCacheSimpleConfig instancepublic EventJournalConfig getEventJournalConfig()
EventJournalConfig for this CacheSimpleConfigpublic CacheSimpleConfig setEventJournalConfig(@Nonnull EventJournalConfig eventJournalConfig)
EventJournalConfig for this CacheSimpleConfigeventJournalConfig - event journal configCacheSimpleConfig instancepublic boolean isDisablePerEntryInvalidationEvents()
true if invalidation events are disabled for per entry, false otherwisepublic CacheSimpleConfig setDisablePerEntryInvalidationEvents(boolean disablePerEntryInvalidationEvents)
disablePerEntryInvalidationEvents - Disables invalidation event sending behaviour if it is true,
                                          otherwise enables itpublic int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getClassId()
IdentifiedDataSerializablegetClassId in interface IdentifiedDataSerializablepublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOException - if an I/O error occurs. In particular,
                     an IOException may be thrown if the
                     output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOException - if an I/O error occurs. In particular,
                     an IOException may be thrown if the
                     input stream has been closed.Copyright © 2020 Hazelcast, Inc.. All rights reserved.