com.hazelcast.config
public class CacheSimpleConfig extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CacheSimpleConfig.ExpiryPolicyFactoryConfig
Represents configuration for "ExpiryPolicyFactory".
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BACKUP_COUNT
The default number of backups.
|
static EvictionPolicy |
DEFAULT_EVICTION_POLICY
Default Eviction Policy.
|
static InMemoryFormat |
DEFAULT_IN_MEMORY_FORMAT
Default InMemory Format.
|
static int |
MAX_BACKUP_COUNT
The maximum number of backups.
|
static int |
MIN_BACKUP_COUNT
The minimum number of backups.
|
Constructor and Description |
---|
CacheSimpleConfig() |
CacheSimpleConfig(CacheSimpleConfig cacheSimpleConfig) |
Modifier and Type | Method and Description |
---|---|
CacheSimpleConfig |
addEntryListenerConfig(CacheSimpleEntryListenerConfig listenerConfig)
Adds
CacheSimpleEntryListenerConfig to this ICache . |
CacheSimpleConfig |
getAsReadOnly()
Gets the immutable version of this simple cache config.
|
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
CacheSimpleEntryListenerConfig from this ICache . |
String |
getCacheLoaderFactory()
Gets the factory for the
CacheLoader . |
String |
getCacheWriterFactory()
Gets the factory for the
CacheWriter . |
EvictionConfig |
getEvictionConfig()
Gets the eviction configuration for this
ICache . |
CacheSimpleConfig.ExpiryPolicyFactoryConfig |
getExpiryPolicyFactoryConfig()
Gets the factory configuration for the
ExpiryPolicy . |
InMemoryFormat |
getInMemoryFormat()
Gets the InMemory Format for this
ICache . |
String |
getKeyType()
Get the key type for this
ICache . |
String |
getName()
Gets the name of this
ICache . |
String |
getValueType()
Get the value type for this
ICache . |
WanReplicationRef |
getWanReplicationRef()
Gets the Wan target replication reference.
|
boolean |
isManagementEnabled()
Checks if management is enabled for this
ICache . |
boolean |
isReadThrough()
Checks if this
ICache is 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
ICache is write-through: a write to the queue also loads the entry
into the data store. |
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
CacheSimpleEntryListenerConfig for this ICache . |
CacheSimpleConfig |
setCacheLoaderFactory(String cacheLoaderFactory)
Sets the factory for this
CacheLoader . |
CacheSimpleConfig |
setCacheWriterFactory(String cacheWriterFactory)
Sets the factory for this
CacheWriter . |
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 |
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 |
setName(String name)
Sets the name of this
ICache . |
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 |
setStatisticsEnabled(boolean statisticsEnabled)
Sets statistics to enabled or disabled for this
ICache . |
CacheSimpleConfig |
setValueType(String valueType)
Sets the value type for this
ICache . |
void |
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. |
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 static final EvictionPolicy DEFAULT_EVICTION_POLICY
public CacheSimpleConfig(CacheSimpleConfig cacheSimpleConfig)
public CacheSimpleConfig()
public CacheSimpleConfig getAsReadOnly()
public CacheSimpleConfig setName(String name)
ICache
.name
- The name to set for this ICache
.public CacheSimpleConfig setKeyType(String keyType)
ICache
.keyType
- The key type to set for this ICache
.public String getValueType()
ICache
.ICache
.public CacheSimpleConfig setValueType(String valueType)
ICache
.valueType
- The value type to set for this ICache
.public boolean isStatisticsEnabled()
ICache
.public CacheSimpleConfig setStatisticsEnabled(boolean statisticsEnabled)
ICache
.statisticsEnabled
- True to enable cache statistics, false to disable.public boolean isManagementEnabled()
ICache
.public CacheSimpleConfig setManagementEnabled(boolean managementEnabled)
ICache
.managementEnabled
- True to enable cache management, false to disable.public boolean isReadThrough()
ICache
is read-through: a read loads the entry from the data store
if it is not already in the cache.public CacheSimpleConfig setReadThrough(boolean readThrough)
readThrough
- True to enable read-through for this ICache
, false to disable.public boolean isWriteThrough()
ICache
is write-through: a write to the queue also loads the entry
into the data store.public 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 disable.public String getCacheLoaderFactory()
CacheLoader
.CacheLoader
.public CacheSimpleConfig setCacheLoaderFactory(String cacheLoaderFactory)
CacheLoader
.cacheLoaderFactory
- The factory to set for this CacheLoader
.public String getCacheWriterFactory()
CacheWriter
.CacheWriter
.public CacheSimpleConfig setCacheWriterFactory(String cacheWriterFactory)
CacheWriter
.cacheWriterFactory
- The factory to set for this CacheWriter
.public CacheSimpleConfig.ExpiryPolicyFactoryConfig getExpiryPolicyFactoryConfig()
ExpiryPolicy
.ExpiryPolicy
.public CacheSimpleConfig setExpiryPolicyFactoryConfig(CacheSimpleConfig.ExpiryPolicyFactoryConfig expiryPolicyFactoryConfig)
ExpiryPolicy
.expiryPolicyFactoryConfig
- The factory configuration to set for this
ExpiryPolicy
.public CacheSimpleConfig setExpiryPolicyFactory(String className)
ExpiryPolicy
.className
- The factory to set for this
ExpiryPolicy
.public CacheSimpleConfig addEntryListenerConfig(CacheSimpleEntryListenerConfig listenerConfig)
CacheSimpleEntryListenerConfig
to this ICache
.listenerConfig
- CacheSimpleConfig
instance.public List<CacheSimpleEntryListenerConfig> getCacheEntryListeners()
CacheSimpleEntryListenerConfig
from this ICache
.CacheSimpleEntryListenerConfig
.public CacheSimpleConfig setCacheEntryListeners(List<CacheSimpleEntryListenerConfig> cacheEntryListeners)
CacheSimpleEntryListenerConfig
for this ICache
.cacheEntryListeners
- list of CacheSimpleEntryListenerConfig
.CacheSimpleConfig
instance.public int getAsyncBackupCount()
ICache
.ICache
.public CacheSimpleConfig setAsyncBackupCount(int asyncBackupCount)
ICache
.asyncBackupCount
- the number of asynchronous synchronous backups to set.IllegalArgumentException
- 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 backups.setBackupCount(int)
,
getAsyncBackupCount()
public int getBackupCount()
ICache
.public CacheSimpleConfig setBackupCount(int backupCount)
ICache
.backupCount
- the new backupCountnew
- IllegalArgumentException 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 Format.public EvictionConfig getEvictionConfig()
ICache
.public CacheSimpleConfig setEvictionConfig(EvictionConfig evictionConfig)
ICache
.evictionConfig
- The eviction configuration to set.public WanReplicationRef getWanReplicationRef()
public void setWanReplicationRef(WanReplicationRef wanReplicationRef)
wanReplicationRef
- the Wan target replication reference.Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.