com.hazelcast.config

## Class MapConfigReadOnly

- java.lang.Object
- - com.hazelcast.config.MapConfig
  - - com.hazelcast.config.MapConfigReadOnly

- All Implemented Interfaces:
    NamedConfig, DataSerializable, IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned, SplitBrainMergeTypeProvider

  Deprecated.
  this class will be removed in 4.0; it is meant for internal usage only.

      public class MapConfigReadOnly
      extends MapConfig

  Contains the configuration for an `IMap` (read-only).

- - ### Field Summary

    - ### Fields inherited from class com.hazelcast.config.MapConfig

      `DEFAULT_BACKUP_COUNT, DEFAULT_CACHED_DESERIALIZED_VALUES, DEFAULT_EVICTION_PERCENTAGE, DEFAULT_EVICTION_POLICY, DEFAULT_IN_MEMORY_FORMAT, DEFAULT_MAP_MERGE_POLICY, DEFAULT_MAX_IDLE_SECONDS, DEFAULT_METADATA_POLICY, DEFAULT_MIN_EVICTION_CHECK_MILLIS, DEFAULT_TTL_SECONDS, MAX_BACKUP_COUNT, MAX_EVICTION_PERCENTAGE, MIN_BACKUP_COUNT, MIN_EVICTION_PERCENTAGE`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `MapConfig` | `addEntryListenerConfig(EntryListenerConfig listenerConfig)` Deprecated.
    `MapConfig` | `addMapIndexConfig(MapIndexConfig mapIndexConfig)` Deprecated.
    `List<EntryListenerConfig>` | `getEntryListenerConfigs()` Deprecated.
    `List<MapIndexConfig>` | `getMapIndexConfigs()` Deprecated.
    `MapStoreConfig` | `getMapStoreConfig()` Deprecated. Returns the map store configuration
    `MaxSizeConfig` | `getMaxSizeConfig()` Deprecated.
    `NearCacheConfig` | `getNearCacheConfig()` Deprecated. Returns the Near Cache configuration
    `PartitioningStrategyConfig` | `getPartitioningStrategyConfig()` Deprecated.
    `List<MapPartitionLostListenerConfig>` | `getPartitionLostListenerConfigs()` Deprecated.
    `List<QueryCacheConfig>` | `getQueryCacheConfigs()` Deprecated. Returns all `QueryCacheConfig` instances defined on this `MapConfig`.
    `WanReplicationRef` | `getWanReplicationRef()` Deprecated. Gets the WAN target replication reference.
    `MapConfig` | `setAsyncBackupCount(int asyncBackupCount)` Deprecated. Sets the number of asynchronous backups.
    `MapConfig` | `setBackupCount(int backupCount)` Deprecated. Number of synchronous backups.
    `MapConfig` | `setCacheDeserializedValues(CacheDeserializedValues cacheDeserializedValues)` Deprecated. Configure de-serialized value caching.
    `MapConfig` | `setEntryListenerConfigs(List<EntryListenerConfig> listenerConfigs)` Deprecated.
    `MapConfig` | `setEvictionPercentage(int evictionPercentage)` Deprecated. When maximum size is reached, the specified percentage of the map will be evicted.
    `MapConfig` | `setEvictionPolicy(EvictionPolicy evictionPolicy)` Deprecated. Sets the `EvictionPolicy`.
    `MapConfig` | `setHotRestartConfig(HotRestartConfig hotRestartConfig)` Deprecated. Sets the `HotRestartConfig` for this `MapConfig`
    `MapConfig` | `setInMemoryFormat(InMemoryFormat inMemoryFormat)` Deprecated. Binary type that will be used for storing records.
    `MapConfig` | `setMapAttributeConfigs(List<MapAttributeConfig> mapAttributeConfigs)` Deprecated.
    `MapConfig` | `setMapEvictionPolicy(MapEvictionPolicy mapEvictionPolicy)` Deprecated. Sets custom eviction policy implementation for this map.
    `MapConfig` | `setMapIndexConfigs(List<MapIndexConfig> mapIndexConfigs)` Deprecated.
    `MapConfig` | `setMapStoreConfig(MapStoreConfig mapStoreConfig)` Deprecated. Sets the map store configuration
    `MapConfig` | `setMaxIdleSeconds(int maxIdleSeconds)` Deprecated. Maximum number of seconds for each entry to stay idle in the map.
    `MapConfig` | `setMaxSizeConfig(MaxSizeConfig maxSizeConfig)` Deprecated.
    `MapConfig` | `setMergePolicy(String mergePolicy)` Deprecated. Sets the merge policy.
    `MapConfig` | `setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)` Deprecated. Sets the `MergePolicyConfig` for this map.
    `MapConfig` | `setMinEvictionCheckMillis(long checkIfEvictableAfterMillis)` Deprecated. Sets the minimum time in milliseconds which should pass before asking if a partition of this map is evictable or not.
    `MapConfig` | `setName(String name)` Deprecated. Sets the name of the `IMap`
    `MapConfig` | `setNearCacheConfig(NearCacheConfig nearCacheConfig)` Deprecated. Sets the Near Cache configuration
    `MapConfig` | `setOptimizeQueries(boolean optimizeQueries)` Deprecated. Enable de-serialized value caching when evaluating predicates.
    `MapConfig` | `setPartitioningStrategyConfig(PartitioningStrategyConfig partitioningStrategyConfig)` Deprecated.
    `MapConfig` | `setPartitionLostListenerConfigs(List<MapPartitionLostListenerConfig> listenerConfigs)` Deprecated.
    `void` | `setQueryCacheConfigs(List<QueryCacheConfig> queryCacheConfigs)` Deprecated. Sets `QueryCacheConfig` instances to this `MapConfig`.
    `MapConfig` | `setQuorumName(String quorumName)` Deprecated.
    `MapConfig` | `setReadBackupData(boolean readBackupData)` Deprecated. Sets read-backup-data (reading local backup entries) for this map.
    `MapConfig` | `setStatisticsEnabled(boolean statisticsEnabled)` Deprecated. Sets statistics to enabled or disabled for this map.
    `MapConfig` | `setTimeToLiveSeconds(int timeToLiveSeconds)` Deprecated. The maximum number of seconds for each entry to stay in the map.
    `MapConfig` | `setWanReplicationRef(WanReplicationRef wanReplicationRef)` Deprecated. Sets the WAN target replication reference.

    - ### Methods inherited from class com.hazelcast.config.MapConfig

      `addMapAttributeConfig, addMapPartitionLostListenerConfig, addQueryCacheConfig, equals, getAsReadOnly, getAsyncBackupCount, getBackupCount, getCacheDeserializedValues, getEvictionPercentage, getEvictionPolicy, getFactoryId, getHotRestartConfig, getId, getInMemoryFormat, getMapAttributeConfigs, getMapEvictionPolicy, getMaxIdleSeconds, getMergePolicy, getMergePolicyConfig, getMetadataPolicy, getMinEvictionCheckMillis, getName, getProvidedMergeTypes, getQuorumName, getTimeToLiveSeconds, getTotalBackupCount, hashCode, isNearCacheEnabled, isOptimizeQueries, isReadBackupData, isStatisticsEnabled, readData, setMetadataPolicy, toString, writeData`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getMaxSizeConfig

          public MaxSizeConfig getMaxSizeConfig()

      Deprecated.
      Overrides:
        `getMaxSizeConfig` in class `MapConfig`

    - #### getWanReplicationRef

          public WanReplicationRef getWanReplicationRef()

      Deprecated.
      Description copied from class: `MapConfig`
      Gets the WAN target replication reference.
      Overrides:
        `getWanReplicationRef` in class `MapConfig`
      Returns:
        the WAN target replication reference

    - #### getEntryListenerConfigs

          public List<EntryListenerConfig> getEntryListenerConfigs()

      Deprecated.
      Overrides:
        `getEntryListenerConfigs` in class `MapConfig`

    - #### getPartitionLostListenerConfigs

          public List<MapPartitionLostListenerConfig> getPartitionLostListenerConfigs()

      Deprecated.
      Overrides:
        `getPartitionLostListenerConfigs` in class `MapConfig`

    - #### getMapIndexConfigs

          public List<MapIndexConfig> getMapIndexConfigs()

      Deprecated.
      Overrides:
        `getMapIndexConfigs` in class `MapConfig`

    - #### getPartitioningStrategyConfig

          public PartitioningStrategyConfig getPartitioningStrategyConfig()

      Deprecated.
      Overrides:
        `getPartitioningStrategyConfig` in class `MapConfig`

    - #### getMapStoreConfig

          public MapStoreConfig getMapStoreConfig()

      Deprecated.
      Description copied from class: `MapConfig`
      Returns the map store configuration
      Overrides:
        `getMapStoreConfig` in class `MapConfig`
      Returns:
        the mapStoreConfig (map store configuration)

    - #### getNearCacheConfig

          public NearCacheConfig getNearCacheConfig()

      Deprecated.
      Description copied from class: `MapConfig`
      Returns the Near Cache configuration
      Overrides:
        `getNearCacheConfig` in class `MapConfig`
      Returns:
        the Near Cache configuration

    - #### getQueryCacheConfigs

          public List<QueryCacheConfig> getQueryCacheConfigs()

      Deprecated.
      Description copied from class: `MapConfig`
      Returns all `QueryCacheConfig` instances defined on this `MapConfig`.
      Overrides:
        `getQueryCacheConfigs` in class `MapConfig`
      Returns:
        all `QueryCacheConfig` instances defined on this `MapConfig`

    - #### setHotRestartConfig

          public MapConfig setHotRestartConfig(HotRestartConfig hotRestartConfig)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets the `HotRestartConfig` for this `MapConfig`
      Overrides:
        `setHotRestartConfig` in class `MapConfig`
      Parameters:
        `hotRestartConfig` - hot restart config
      Returns:
        this `MapConfig` instance

    - #### setName

          public MapConfig setName(String name)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets the name of the `IMap`
      Specified by:
        `setName` in interface `NamedConfig`
      Overrides:
        `setName` in class `MapConfig`
      Parameters:
        `name` - the name to set for this `IMap`

    - #### setInMemoryFormat

          public MapConfig setInMemoryFormat(InMemoryFormat inMemoryFormat)

      Deprecated.
      Description copied from class: `MapConfig`
      Binary type that will be used for storing records. Possible values:
      - BINARY (default): keys and values will be stored as binary data
      - OBJECT: values will be stored in their object forms
      - NATIVE: values will be stored in non-heap region of JVM
      Overrides:
        `setInMemoryFormat` in class `MapConfig`
      Parameters:
        `inMemoryFormat` - the record type to set for this `IMap`

    - #### setBackupCount

          public MapConfig setBackupCount(int backupCount)

      Deprecated.
      Description copied from class: `MapConfig`
      Number of synchronous backups. For example, if 1 is set as the backup count, then all entries of the map will be copied to another JVM for fail-safety. 0 means no sync backup.
      Overrides:
        `setBackupCount` in class `MapConfig`
      Parameters:
        `backupCount` - the number of synchronous backups to set for this `IMap`
      See Also:
        `MapConfig.setAsyncBackupCount(int)`

    - #### setAsyncBackupCount

          public MapConfig setAsyncBackupCount(int asyncBackupCount)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets the number of asynchronous backups. 0 means no backups.
      Overrides:
        `setAsyncBackupCount` in class `MapConfig`
      Parameters:
        `asyncBackupCount` - the number of asynchronous synchronous backups to set
      Returns:
        the updated CacheConfig
      See Also:
        `MapConfig.setBackupCount(int)`, `MapConfig.getAsyncBackupCount()`

    - #### setEvictionPercentage

          public MapConfig setEvictionPercentage(int evictionPercentage)

      Deprecated.
      Description copied from class: `MapConfig`
      When maximum size is reached, the specified percentage of the map will be evicted. Any integer between 0 and 100 is allowed. For example, if 25 is set, 25% of the entries will be evicted.

      Beware that eviction mechanism is different for NATIVE in-memory format (It uses a probabilistic algorithm based on sampling. Please see documentation for further details) and this parameter has no effect.

      Overrides:
        `setEvictionPercentage` in class `MapConfig`
      Parameters:
        `evictionPercentage` - the evictionPercentage to set: the specified percentage of the map to be evicted

    - #### setMinEvictionCheckMillis

          public MapConfig setMinEvictionCheckMillis(long checkIfEvictableAfterMillis)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets the minimum time in milliseconds which should pass before asking if a partition of this map is evictable or not.

      Default value is 100L milliseconds.

      Beware that eviction mechanism is different for NATIVE in-memory format (It uses a probabilistic algorithm based on sampling. Please see documentation for further details) and this parameter has no effect.

      Overrides:
        `setMinEvictionCheckMillis` in class `MapConfig`
      Parameters:
        `checkIfEvictableAfterMillis` - time in milliseconds that should pass before asking for the next eviction

    - #### setTimeToLiveSeconds

          public MapConfig setTimeToLiveSeconds(int timeToLiveSeconds)

      Deprecated.
      Description copied from class: `MapConfig`
      The maximum number of seconds for each entry to stay in the map. Entries that are older than timeToLiveSeconds will be automatically evicted from the map. Updates on the entry will change the eviction time. Any integer between 0 and Integer.MAX_VALUE. 0 means infinite. Default is 0.
      Overrides:
        `setTimeToLiveSeconds` in class `MapConfig`
      Parameters:
        `timeToLiveSeconds` - the timeToLiveSeconds to set

    - #### setMaxIdleSeconds

          public MapConfig setMaxIdleSeconds(int maxIdleSeconds)

      Deprecated.
      Description copied from class: `MapConfig`
      Maximum number of seconds for each entry to stay idle in the map. Entries that are idle (not touched) for more than `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.
      Overrides:
        `setMaxIdleSeconds` in class `MapConfig`
      Parameters:
        `maxIdleSeconds` - the maxIdleSeconds (the maximum number of seconds for each entry to stay idle in the map) to set

    - #### setMaxSizeConfig

          public MapConfig setMaxSizeConfig(MaxSizeConfig maxSizeConfig)

      Deprecated.
      Overrides:
        `setMaxSizeConfig` in class `MapConfig`

    - #### setEvictionPolicy

          public MapConfig setEvictionPolicy(EvictionPolicy evictionPolicy)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets the `EvictionPolicy`. Default value is `EvictionPolicy.NONE`.
      Overrides:
        `setEvictionPolicy` in class `MapConfig`
      Parameters:
        `evictionPolicy` - the evictionPolicy to set

    - #### setMapEvictionPolicy

          public MapConfig setMapEvictionPolicy(MapEvictionPolicy mapEvictionPolicy)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets custom eviction policy implementation for this map.

      Internal eviction algorithm finds most appropriate entry to evict from this map by using supplied policy.

      Overrides:
        `setMapEvictionPolicy` in class `MapConfig`
      Parameters:
        `mapEvictionPolicy` - custom eviction policy implementation
      Returns:
        the updated map configuration

    - #### setMapStoreConfig

          public MapConfig setMapStoreConfig(MapStoreConfig mapStoreConfig)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets the map store configuration
      Overrides:
        `setMapStoreConfig` in class `MapConfig`
      Parameters:
        `mapStoreConfig` - the mapStoreConfig (map store configuration) to set

    - #### setNearCacheConfig

          public MapConfig setNearCacheConfig(NearCacheConfig nearCacheConfig)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets the Near Cache configuration
      Overrides:
        `setNearCacheConfig` in class `MapConfig`
      Parameters:
        `nearCacheConfig` - the Near Cache configuration
      Returns:
        the updated map configuration

    - #### setMergePolicy

          public MapConfig setMergePolicy(String mergePolicy)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets the merge policy.

      Accepts a classname of `SplitBrainMergePolicy` or the deprecated `MapMergePolicy`.

      Overrides:
        `setMergePolicy` in class `MapConfig`
      Parameters:
        `mergePolicy` - the merge policy classname to set
      Returns:
        the updated map configuration

    - #### setMergePolicyConfig

          public MapConfig setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets the `MergePolicyConfig` for this map.
      Overrides:
        `setMergePolicyConfig` in class `MapConfig`
      Returns:
        the updated map configuration

    - #### setStatisticsEnabled

          public MapConfig setStatisticsEnabled(boolean statisticsEnabled)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets statistics to enabled or disabled for this map.
      Overrides:
        `setStatisticsEnabled` in class `MapConfig`
      Parameters:
        `statisticsEnabled` - `true` to enable map statistics, `false` to disable
      Returns:
        the current map config instance

    - #### setReadBackupData

          public MapConfig setReadBackupData(boolean readBackupData)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets read-backup-data (reading local backup entries) for this map.
      Overrides:
        `setReadBackupData` in class `MapConfig`
      Parameters:
        `readBackupData` - `true` to enable read-backup-data, `false` to disable
      Returns:
        the current map config instance

    - #### setWanReplicationRef

          public MapConfig setWanReplicationRef(WanReplicationRef wanReplicationRef)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets the WAN target replication reference.
      Overrides:
        `setWanReplicationRef` in class `MapConfig`
      Parameters:
        `wanReplicationRef` - the WAN target replication reference
      Returns:
        the current map config instance

    - #### addEntryListenerConfig

          public MapConfig addEntryListenerConfig(EntryListenerConfig listenerConfig)

      Deprecated.
      Overrides:
        `addEntryListenerConfig` in class `MapConfig`

    - #### setEntryListenerConfigs

          public MapConfig setEntryListenerConfigs(List<EntryListenerConfig> listenerConfigs)

      Deprecated.
      Overrides:
        `setEntryListenerConfigs` in class `MapConfig`

    - #### addMapIndexConfig

          public MapConfig addMapIndexConfig(MapIndexConfig mapIndexConfig)

      Deprecated.
      Overrides:
        `addMapIndexConfig` in class `MapConfig`

    - #### setMapIndexConfigs

          public MapConfig setMapIndexConfigs(List<MapIndexConfig> mapIndexConfigs)

      Deprecated.
      Overrides:
        `setMapIndexConfigs` in class `MapConfig`

    - #### setPartitioningStrategyConfig

          public MapConfig setPartitioningStrategyConfig(PartitioningStrategyConfig partitioningStrategyConfig)

      Deprecated.
      Overrides:
        `setPartitioningStrategyConfig` in class `MapConfig`

    - #### setOptimizeQueries

          public MapConfig setOptimizeQueries(boolean optimizeQueries)

      Deprecated.
      Description copied from class: `MapConfig`
      Enable de-serialized value caching when evaluating predicates. It has no effect when `InMemoryFormat` is `InMemoryFormat.OBJECT` or when `Portable` serialization is used.
      Overrides:
        `setOptimizeQueries` in class `MapConfig`
      Parameters:
        `optimizeQueries` - `true` if queries should be optimized, `false` otherwise
      Returns:
        this `MapConfig` instance
      See Also:
        `CacheDeserializedValues`

    - #### setPartitionLostListenerConfigs

          public MapConfig setPartitionLostListenerConfigs(List<MapPartitionLostListenerConfig> listenerConfigs)

      Deprecated.
      Overrides:
        `setPartitionLostListenerConfigs` in class `MapConfig`

    - #### setMapAttributeConfigs

          public MapConfig setMapAttributeConfigs(List<MapAttributeConfig> mapAttributeConfigs)

      Deprecated.
      Overrides:
        `setMapAttributeConfigs` in class `MapConfig`

    - #### setQueryCacheConfigs

          public void setQueryCacheConfigs(List<QueryCacheConfig> queryCacheConfigs)

      Deprecated.
      Description copied from class: `MapConfig`
      Sets `QueryCacheConfig` instances to this `MapConfig`.
      Overrides:
        `setQueryCacheConfigs` in class `MapConfig`

    - #### setCacheDeserializedValues

          public MapConfig setCacheDeserializedValues(CacheDeserializedValues cacheDeserializedValues)

      Deprecated.
      Description copied from class: `MapConfig`
      Configure de-serialized value caching. Default: `CacheDeserializedValues.INDEX_ONLY`
      Overrides:
        `setCacheDeserializedValues` in class `MapConfig`
      Returns:
        this `MapConfig` instance
      See Also:
        `CacheDeserializedValues`

    - #### setQuorumName

          public MapConfig setQuorumName(String quorumName)

      Deprecated.
      Overrides:
        `setQuorumName` in class `MapConfig`

Copyright © 2019. All rights reserved.