public class MapConfig extends Object implements IdentifiedDataSerializable, NamedConfig
IMap.| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULT_BACKUP_COUNTThe default number of backups | 
| static CacheDeserializedValues | DEFAULT_CACHED_DESERIALIZED_VALUESWe want to cache values only when an index is defined. | 
| static EvictionPolicy | DEFAULT_EVICTION_POLICYDefault eviction policy | 
| static InMemoryFormat | DEFAULT_IN_MEMORY_FORMATDefault In-Memory format is binary. | 
| static int | DEFAULT_MAX_IDLE_SECONDSThe number of default time to wait eviction in seconds. | 
| static int | DEFAULT_MAX_SIZEDefault max size. | 
| static MaxSizePolicy | DEFAULT_MAX_SIZE_POLICYDefault max size policy | 
| static MetadataPolicy | DEFAULT_METADATA_POLICYDefault metadata policy | 
| static boolean | DEFAULT_STATISTICS_ENABLEDDefault value of whether statistics are enabled or not | 
| static int | DEFAULT_TTL_SECONDSThe number of default Time to Live in seconds. | 
| static int | MAX_BACKUP_COUNTThe maximum number of backups | 
| static int | MIN_BACKUP_COUNTThe minimum number of backups | 
| Constructor and Description | 
|---|
| MapConfig() | 
| MapConfig(MapConfig config) | 
| MapConfig(String name) | 
| Modifier and Type | Method and Description | 
|---|---|
| MapConfig | addAttributeConfig(AttributeConfig attributeConfig) | 
| MapConfig | addEntryListenerConfig(EntryListenerConfig listenerConfig) | 
| MapConfig | addIndexConfig(IndexConfig indexConfig) | 
| MapConfig | addMapPartitionLostListenerConfig(MapPartitionLostListenerConfig listenerConfig) | 
| MapConfig | addQueryCacheConfig(QueryCacheConfig queryCacheConfig)Adds a new  QueryCacheConfigto thisMapConfig. | 
| boolean | equals(Object o) | 
| int | getAsyncBackupCount()Returns the asynchronous backup count for this  IMap. | 
| List<AttributeConfig> | getAttributeConfigs() | 
| int | getBackupCount()Returns the backupCount for this  IMap | 
| CacheDeserializedValues | getCacheDeserializedValues()Get current value cache settings | 
| int | getClassId()Returns type identifier for this class. | 
| List<EntryListenerConfig> | getEntryListenerConfigs() | 
| EventJournalConfig | getEventJournalConfig()Gets the  EventJournalConfigfor thisMapConfig | 
| EvictionConfig | getEvictionConfig()Gets the  EvictionConfiginstance of the eviction
 configuration for thisIMap. | 
| int | getFactoryId()Returns DataSerializableFactory factory ID for this class. | 
| HotRestartConfig | getHotRestartConfig()Gets the  HotRestartConfigfor thisMapConfig | 
| List<IndexConfig> | getIndexConfigs() | 
| InMemoryFormat | getInMemoryFormat()Returns the data type that will be used for storing records. | 
| MapStoreConfig | getMapStoreConfig()Returns the map store configuration | 
| int | getMaxIdleSeconds()Returns the maximum number of seconds for each entry to stay idle in the map. | 
| MergePolicyConfig | getMergePolicyConfig()Gets the  MergePolicyConfigfor this map. | 
| MerkleTreeConfig | getMerkleTreeConfig()Gets the  MerkleTreeConfigfor thisMapConfig | 
| MetadataPolicy | getMetadataPolicy()Returns  MetadataPolicyfor this map. | 
| String | getName()Returns the name of this  IMap | 
| NearCacheConfig | getNearCacheConfig()Returns the Near Cache configuration | 
| PartitioningStrategyConfig | getPartitioningStrategyConfig() | 
| List<MapPartitionLostListenerConfig> | getPartitionLostListenerConfigs() | 
| List<QueryCacheConfig> | getQueryCacheConfigs()Returns all  QueryCacheConfiginstances defined on thisMapConfig. | 
| String | getSplitBrainProtectionName() | 
| int | getTimeToLiveSeconds()Returns the maximum number of seconds for each entry to stay in the map. | 
| int | getTotalBackupCount()Returns the total number of backups: backupCount plus asyncBackupCount. | 
| WanReplicationRef | getWanReplicationRef()Gets the WAN target replication reference. | 
| int | hashCode() | 
| boolean | isNearCacheEnabled()Checks if Near Cache is enabled. | 
| boolean | isReadBackupData()Checks if read-backup-data (reading local backup entries) is enabled for this map. | 
| boolean | isStatisticsEnabled()Checks if statistics are enabled for this map. | 
| void | readData(ObjectDataInput in)Reads fields from the input stream | 
| MapConfig | setAsyncBackupCount(int asyncBackupCount)Sets the number of asynchronous backups. | 
| MapConfig | setAttributeConfigs(List<AttributeConfig> attributeConfigs) | 
| MapConfig | setBackupCount(int backupCount)Number of synchronous backups. | 
| MapConfig | setCacheDeserializedValues(CacheDeserializedValues cacheDeserializedValues)Configure de-serialized value caching. | 
| MapConfig | setEntryListenerConfigs(List<EntryListenerConfig> listenerConfigs) | 
| MapConfig | setEventJournalConfig(EventJournalConfig eventJournalConfig)Sets the  EventJournalConfigfor thisMapConfig | 
| MapConfig | setEvictionConfig(EvictionConfig evictionConfig)Sets the  EvictionConfiginstance for eviction
 configuration for thisIMap. | 
| MapConfig | setHotRestartConfig(HotRestartConfig hotRestartConfig)Sets the  HotRestartConfigfor thisMapConfig | 
| MapConfig | setIndexConfigs(List<IndexConfig> indexConfigs) | 
| MapConfig | setInMemoryFormat(InMemoryFormat inMemoryFormat)Binary type that will be used for storing records. | 
| MapConfig | setMapStoreConfig(MapStoreConfig mapStoreConfig)Sets the map store configuration | 
| MapConfig | setMaxIdleSeconds(int maxIdleSeconds)Maximum number of seconds for each entry to stay idle in the
 map. | 
| MapConfig | setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)Sets the  MergePolicyConfigfor this map. | 
| MapConfig | setMerkleTreeConfig(MerkleTreeConfig merkleTreeConfig)Sets the  MerkleTreeConfigfor thisMapConfig | 
| MapConfig | setMetadataPolicy(MetadataPolicy metadataPolicy)Sets the metadata policy. | 
| MapConfig | setName(String name)Sets the name of the  IMap | 
| MapConfig | setNearCacheConfig(NearCacheConfig nearCacheConfig)Sets the Near Cache configuration | 
| MapConfig | setPartitioningStrategyConfig(PartitioningStrategyConfig partitioningStrategyConfig) | 
| MapConfig | setPartitionLostListenerConfigs(List<MapPartitionLostListenerConfig> listenerConfigs) | 
| MapConfig | setQueryCacheConfigs(List<QueryCacheConfig> queryCacheConfigs)Sets  QueryCacheConfiginstances to thisMapConfig. | 
| MapConfig | setReadBackupData(boolean readBackupData)Sets read-backup-data (reading local backup entries) for this map. | 
| MapConfig | setSplitBrainProtectionName(String splitBrainProtectionName) | 
| MapConfig | setStatisticsEnabled(boolean statisticsEnabled)Sets statistics to enabled or disabled for this map. | 
| MapConfig | setTimeToLiveSeconds(int timeToLiveSeconds)The maximum number of seconds for each entry to stay in the map. | 
| MapConfig | setWanReplicationRef(WanReplicationRef wanReplicationRef)Sets the WAN target replication reference. | 
| String | toString() | 
| void | writeData(ObjectDataOutput out)Writes object fields to output stream | 
public static final int MIN_BACKUP_COUNT
public static final int DEFAULT_BACKUP_COUNT
public static final int MAX_BACKUP_COUNT
public static final int DEFAULT_TTL_SECONDS
public static final int DEFAULT_MAX_IDLE_SECONDS
public static final InMemoryFormat DEFAULT_IN_MEMORY_FORMAT
public static final CacheDeserializedValues DEFAULT_CACHED_DESERIALIZED_VALUES
public static final MetadataPolicy DEFAULT_METADATA_POLICY
public static final boolean DEFAULT_STATISTICS_ENABLED
public static final int DEFAULT_MAX_SIZE
public static final MaxSizePolicy DEFAULT_MAX_SIZE_POLICY
public static final EvictionPolicy DEFAULT_EVICTION_POLICY
public MapConfig()
public MapConfig(String name)
public MapConfig(MapConfig config)
public String getName()
IMapgetName in interface NamedConfigIMappublic MapConfig setName(String name)
IMapsetName in interface NamedConfigname - the name to set for this IMappublic InMemoryFormat getInMemoryFormat()
public MapConfig setInMemoryFormat(InMemoryFormat inMemoryFormat)
inMemoryFormat - the record type to set for this IMapIllegalArgumentException - if inMemoryFormat is nullpublic EvictionConfig getEvictionConfig()
EvictionConfig instance of the eviction
 configuration for this IMap.EvictionConfig
 instance of the eviction configurationpublic MapConfig setEvictionConfig(EvictionConfig evictionConfig)
EvictionConfig instance for eviction
 configuration for this IMap.evictionConfig - the EvictionConfig
                       instance to set for the eviction configurationpublic int getBackupCount()
IMapIMapgetAsyncBackupCount()public MapConfig setBackupCount(int backupCount)
backupCount - the number of synchronous backups to set for this IMapsetAsyncBackupCount(int)public int getAsyncBackupCount()
IMap.setBackupCount(int)public MapConfig setAsyncBackupCount(int asyncBackupCount)
asyncBackupCount - the number of asynchronous synchronous backups to setIllegalArgumentException - if asyncBackupCount 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 backupssetBackupCount(int), 
getAsyncBackupCount()public int getTotalBackupCount()
public int getTimeToLiveSeconds()
public MapConfig setTimeToLiveSeconds(int timeToLiveSeconds)
timeToLiveSeconds - the timeToLiveSeconds to setpublic int getMaxIdleSeconds()
public MapConfig setMaxIdleSeconds(int maxIdleSeconds)
maxIdleSeconds will get automatically evicted from the map. Entry
 is touched if get(), getAll(), put() or
 containsKey() is called. Any integer between 0
 and Integer.MAX_VALUE. 0 means infinite. Default
 is 0. The time precision is limited by 1 second. The
 MaxIdle that less than 1 second can lead to unexpected behaviour.maxIdleSeconds - the maxIdleSeconds (the maximum number
                       of seconds for each entry to stay idle in the map) to setpublic MapStoreConfig getMapStoreConfig()
public MapConfig setMapStoreConfig(MapStoreConfig mapStoreConfig)
mapStoreConfig - the mapStoreConfig (map store configuration) to setpublic NearCacheConfig getNearCacheConfig()
public MapConfig setNearCacheConfig(NearCacheConfig nearCacheConfig)
nearCacheConfig - the Near Cache configurationpublic MergePolicyConfig getMergePolicyConfig()
MergePolicyConfig for this map.MergePolicyConfig for this mappublic MapConfig setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
MergePolicyConfig for this map.public boolean isStatisticsEnabled()
true if statistics are enabled, false otherwisepublic MapConfig setStatisticsEnabled(boolean statisticsEnabled)
statisticsEnabled - true to enable map statistics, false to disablepublic boolean isReadBackupData()
true if read-backup-data is enabled, false otherwisepublic MapConfig setReadBackupData(boolean readBackupData)
readBackupData - true to enable read-backup-data, false to disablepublic WanReplicationRef getWanReplicationRef()
public MapConfig setWanReplicationRef(WanReplicationRef wanReplicationRef)
wanReplicationRef - the WAN target replication referencepublic MapConfig addEntryListenerConfig(EntryListenerConfig listenerConfig)
public List<EntryListenerConfig> getEntryListenerConfigs()
public MapConfig setEntryListenerConfigs(List<EntryListenerConfig> listenerConfigs)
public MapConfig addMapPartitionLostListenerConfig(MapPartitionLostListenerConfig listenerConfig)
public List<MapPartitionLostListenerConfig> getPartitionLostListenerConfigs()
public MapConfig setPartitionLostListenerConfigs(List<MapPartitionLostListenerConfig> listenerConfigs)
public MapConfig addIndexConfig(IndexConfig indexConfig)
public List<IndexConfig> getIndexConfigs()
public MapConfig setIndexConfigs(List<IndexConfig> indexConfigs)
public MapConfig addAttributeConfig(AttributeConfig attributeConfig)
public List<AttributeConfig> getAttributeConfigs()
public MapConfig setAttributeConfigs(List<AttributeConfig> attributeConfigs)
public MetadataPolicy getMetadataPolicy()
MetadataPolicy for this map.MetadataPolicy for this mappublic MapConfig setMetadataPolicy(MetadataPolicy metadataPolicy)
MetadataPolicy for more
 information.metadataPolicy - the metadata policypublic MapConfig addQueryCacheConfig(QueryCacheConfig queryCacheConfig)
QueryCacheConfig to this MapConfig.queryCacheConfig - the config to be addedMapConfig instanceIllegalArgumentException - if there is already a QueryCache
                                            with the same QueryCacheConfig#namepublic List<QueryCacheConfig> getQueryCacheConfigs()
QueryCacheConfig instances defined on this MapConfig.QueryCacheConfig instances defined on this MapConfigpublic MapConfig setQueryCacheConfigs(List<QueryCacheConfig> queryCacheConfigs)
QueryCacheConfig instances to this MapConfig.public PartitioningStrategyConfig getPartitioningStrategyConfig()
public MapConfig setPartitioningStrategyConfig(PartitioningStrategyConfig partitioningStrategyConfig)
public boolean isNearCacheEnabled()
true if Near Cache is enabled, false otherwisepublic MapConfig setCacheDeserializedValues(CacheDeserializedValues cacheDeserializedValues)
CacheDeserializedValues.INDEX_ONLYMapConfig instanceCacheDeserializedValues@Nonnull public HotRestartConfig getHotRestartConfig()
HotRestartConfig for this MapConfigpublic MapConfig setHotRestartConfig(@Nonnull HotRestartConfig hotRestartConfig)
HotRestartConfig for this MapConfighotRestartConfig - hot restart configMapConfig instance@Nonnull public MerkleTreeConfig getMerkleTreeConfig()
MerkleTreeConfig for this MapConfigpublic MapConfig setMerkleTreeConfig(@Nonnull MerkleTreeConfig merkleTreeConfig)
MerkleTreeConfig for this MapConfigmerkleTreeConfig - merkle tree configMapConfig instance@Nonnull public EventJournalConfig getEventJournalConfig()
EventJournalConfig for this MapConfigpublic MapConfig setEventJournalConfig(@Nonnull EventJournalConfig eventJournalConfig)
EventJournalConfig for this MapConfigeventJournalConfig - event journal configMapConfig instancepublic CacheDeserializedValues getCacheDeserializedValues()
public String getSplitBrainProtectionName()
public MapConfig setSplitBrainProtectionName(String splitBrainProtectionName)
public 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.