com.hazelcast.config

## Class ReplicatedMapConfig

- java.lang.Object
- - com.hazelcast.config.ReplicatedMapConfig

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

      public class ReplicatedMapConfig
      extends Object
      implements SplitBrainMergeTypeProvider, IdentifiedDataSerializable, com.hazelcast.nio.serialization.impl.Versioned

  Contains the configuration for an `ReplicatedMap`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_ASNYC_FILLUP` Default value of asynchronous fill up
    `static int` | `DEFAULT_CONCURRENCY_LEVEL` Default value of concurrency level
    `static InMemoryFormat` | `DEFAULT_IN_MEMORY_FORMAT` Default value of In-memory format
    `static String` | `DEFAULT_MERGE_POLICY` Default policy for merging
    `static int` | `DEFAULT_REPLICATION_DELAY_MILLIS` Default value of delay of replication in millisecond

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ReplicatedMapConfig()`
    `ReplicatedMapConfig(ReplicatedMapConfig replicatedMapConfig)`
    `ReplicatedMapConfig(String name)` Creates a ReplicatedMapConfig with the given name.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `ReplicatedMapConfig` | `addEntryListenerConfig(EntryListenerConfig listenerConfig)`
    `boolean` | `equals(Object o)`
    `ReplicatedMapConfig` | `getAsReadOnly()` Deprecated. this method will be removed in 4.0; it is meant for internal usage only
    `int` | `getConcurrencyLevel()` Deprecated. new implementation doesn't use mutexes
    `int` | `getFactoryId()` Returns DataSerializableFactory factory ID for this class.
    `int` | `getId()` Returns type identifier for this class.
    `InMemoryFormat` | `getInMemoryFormat()` Data type used to store entries.
    `List<ListenerConfig>` | `getListenerConfigs()`
    `String` | `getMergePolicy()` Deprecated. since 3.10, please use `getMergePolicyConfig()` and `MergePolicyConfig.getPolicy()`
    `MergePolicyConfig` | `getMergePolicyConfig()` Gets the `MergePolicyConfig` for this replicated map.
    `String` | `getName()` Returns the name of this `ReplicatedMap`.
    `Class` | `getProvidedMergeTypes()`
    `String` | `getQuorumName()` Returns the quorum name for operations.
    `long` | `getReplicationDelayMillis()` Deprecated. since new implementation will route puts to the partition owner nodes, caching won't help replication speed because most of the time subsequent puts will end up in different nodes
    `ScheduledExecutorService` | `getReplicatorExecutorService()` Deprecated. new implementation doesn't use executor service for replication
    `int` | `hashCode()`
    `boolean` | `isAsyncFillup()` True if the replicated map is available for reads before the initial replication is completed, false otherwise.
    `boolean` | `isStatisticsEnabled()` Checks if statistics are enabled for this replicated map.
    `void` | `readData(ObjectDataInput in)` Reads fields from the input stream
    `void` | `setAsyncFillup(boolean asyncFillup)` True if the replicated map is available for reads before the initial replication is completed, false otherwise.
    `ReplicatedMapConfig` | `setConcurrencyLevel(int concurrencyLevel)` Deprecated. new implementation doesn't use mutexes
    `ReplicatedMapConfig` | `setInMemoryFormat(InMemoryFormat inMemoryFormat)` Data type used to store entries.
    `ReplicatedMapConfig` | `setListenerConfigs(List<ListenerConfig> listenerConfigs)`
    `ReplicatedMapConfig` | `setMergePolicy(String mergePolicy)` Deprecated. since 3.10, please use `setMergePolicyConfig(MergePolicyConfig)`
    `ReplicatedMapConfig` | `setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)` Sets the `MergePolicyConfig` for this replicated map.
    `ReplicatedMapConfig` | `setName(String name)` Sets the name of this `ReplicatedMap`.
    `ReplicatedMapConfig` | `setQuorumName(String quorumName)` Sets the quorum name for operations.
    `ReplicatedMapConfig` | `setReplicationDelayMillis(long replicationDelayMillis)` Deprecated. since new implementation will route puts to the partition owner nodes, caching won't help replication speed because most of the time subsequent puts will end up in different nodes
    `ReplicatedMapConfig` | `setReplicatorExecutorService(ScheduledExecutorService replicatorExecutorService)` Deprecated. new implementation doesn't use executor service for replication
    `ReplicatedMapConfig` | `setStatisticsEnabled(boolean statisticsEnabled)` Sets statistics to enabled or disabled for this replicated map.
    `String` | `toString()`
    `void` | `writeData(ObjectDataOutput out)` Writes object fields to output stream

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

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

- - ### Field Detail

    - #### DEFAULT_CONCURRENCY_LEVEL

          public static final int DEFAULT_CONCURRENCY_LEVEL

      Default value of concurrency level
      See Also:
        Constant Field Values

    - #### DEFAULT_REPLICATION_DELAY_MILLIS

          public static final int DEFAULT_REPLICATION_DELAY_MILLIS

      Default value of delay of replication in millisecond
      See Also:
        Constant Field Values

    - #### DEFAULT_IN_MEMORY_FORMAT

          public static final InMemoryFormat DEFAULT_IN_MEMORY_FORMAT

      Default value of In-memory format

    - #### DEFAULT_ASNYC_FILLUP

          public static final boolean DEFAULT_ASNYC_FILLUP

      Default value of asynchronous fill up
      See Also:
        Constant Field Values

    - #### DEFAULT_MERGE_POLICY

          public static final String DEFAULT_MERGE_POLICY

      Default policy for merging

  - ### Constructor Detail

    - #### ReplicatedMapConfig

          public ReplicatedMapConfig()

    - #### ReplicatedMapConfig

          public ReplicatedMapConfig(String name)

      Creates a ReplicatedMapConfig with the given name.
      Parameters:
        `name` - the name of the ReplicatedMap

    - #### ReplicatedMapConfig

          public ReplicatedMapConfig(ReplicatedMapConfig replicatedMapConfig)

  - ### Method Detail

    - #### getName

          public String getName()

      Returns the name of this `ReplicatedMap`.
      Returns:
        the name of the `ReplicatedMap`

    - #### setName

          public ReplicatedMapConfig setName(String name)

      Sets the name of this `ReplicatedMap`.
      Parameters:
        `name` - the name of the `ReplicatedMap`
      Returns:
        the current replicated map config instance

    - #### getReplicationDelayMillis

          @Deprecated
          public long getReplicationDelayMillis()

      Deprecated. since new implementation will route puts to the partition owner nodes, caching won't help replication speed because most of the time subsequent puts will end up in different nodes
      The number of milliseconds after a put is executed before the value is replicated to other nodes. During this time, multiple puts can be operated and cached up to be sent out all at once after the delay.

      The default value is 100ms before a replication is operated. If set to 0, no delay is used and all values are replicated one by one.

      Returns:
        the number of milliseconds after a put is executed before the value is replicated to other nodes

    - #### setReplicationDelayMillis

          @Deprecated
          public ReplicatedMapConfig setReplicationDelayMillis(long replicationDelayMillis)

      Deprecated. since new implementation will route puts to the partition owner nodes, caching won't help replication speed because most of the time subsequent puts will end up in different nodes
      Sets the number of milliseconds after a put is executed before the value is replicated to other nodes. During this time, multiple puts can be operated and cached up to be sent out all at once after the delay.

      The default value is 100ms before a replication is operated. If set to 0, no delay is used and all values are replicated one by one.

      Parameters:
        `replicationDelayMillis` - the number of milliseconds after a put is executed before the value is replicated to other nodes
      Returns:
        the current replicated map config instance

    - #### getConcurrencyLevel

          @Deprecated
          public int getConcurrencyLevel()

      Deprecated. new implementation doesn't use mutexes
      Number of parallel mutexes to minimize contention on keys. The default value is 32 which is a good number for lots of applications. If higher contention is seen on writes to values inside of the replicated map, this value can be adjusted to the needs.
      Returns:
        Number of parallel mutexes to minimize contention on keys

    - #### setConcurrencyLevel

          @Deprecated
          public ReplicatedMapConfig setConcurrencyLevel(int concurrencyLevel)

      Deprecated. new implementation doesn't use mutexes
      Sets the number of parallel mutexes to minimize contention on keys. The default value is 32 which is a good number for lots of applications. If higher contention is seen on writes to values inside of the replicated map, this value can be adjusted to the needs.
      Parameters:
        `concurrencyLevel` - Number of parallel mutexes to minimize contention on keys
      Returns:
        the current replicated map config instance

    - #### getInMemoryFormat

          public InMemoryFormat getInMemoryFormat()

      Data type used to store entries.

      Possible values:

      - BINARY: keys and values are stored as binary data
      - OBJECT (default): values are stored in their object forms
      - NATIVE: keys and values are stored in native memory
      Returns:
        Data type used to store entries

    - #### setInMemoryFormat

          public ReplicatedMapConfig setInMemoryFormat(InMemoryFormat inMemoryFormat)

      Data type used to store entries.

      Possible values:

      - BINARY: keys and values are stored as binary data
      - OBJECT (default): values are stored in their object forms
      - NATIVE: keys and values are stored in native memory
      Parameters:
        `inMemoryFormat` - Data type used to store entries
      Returns:
        the current replicated map config instance

    - #### getReplicatorExecutorService

          @Deprecated
          public ScheduledExecutorService getReplicatorExecutorService()

      Deprecated. new implementation doesn't use executor service for replication

    - #### setReplicatorExecutorService

          @Deprecated
          public ReplicatedMapConfig setReplicatorExecutorService(ScheduledExecutorService replicatorExecutorService)

      Deprecated. new implementation doesn't use executor service for replication

    - #### getListenerConfigs

          public List<ListenerConfig> getListenerConfigs()

    - #### setListenerConfigs

          public ReplicatedMapConfig setListenerConfigs(List<ListenerConfig> listenerConfigs)

    - #### addEntryListenerConfig

          public ReplicatedMapConfig addEntryListenerConfig(EntryListenerConfig listenerConfig)

    - #### isAsyncFillup

          public boolean isAsyncFillup()

      True if the replicated map is available for reads before the initial replication is completed, false otherwise. Default is true. If false, no Exception will be thrown when the replicated map is not yet ready, but `null` values can be seen until the initial replication is completed.
      Returns:
        `true` if the replicated map is available for reads before the initial replication is completed, `false` otherwise

    - #### setAsyncFillup

          public void setAsyncFillup(boolean asyncFillup)

      True if the replicated map is available for reads before the initial replication is completed, false otherwise. Default is true. If false, no Exception will be thrown when the replicated map is not yet ready, but `null` values can be seen until the initial replication is completed.
      Parameters:
        `asyncFillup` - `true` if the replicated map is available for reads before the initial replication is completed, `false` otherwise

    - #### getAsReadOnly

          public ReplicatedMapConfig getAsReadOnly()

      Deprecated. this method will be removed in 4.0; it is meant for internal usage only
      Gets immutable version of this configuration.
      Returns:
        immutable version of this configuration

    - #### isStatisticsEnabled

          public boolean isStatisticsEnabled()

      Checks if statistics are enabled for this replicated map.
      Returns:
        `true` if statistics are enabled, `false` otherwise

    - #### setStatisticsEnabled

          public ReplicatedMapConfig setStatisticsEnabled(boolean statisticsEnabled)

      Sets statistics to enabled or disabled for this replicated map.
      Parameters:
        `statisticsEnabled` - `true` to enable replicated map statistics, `false` to disable
      Returns:
        the current replicated map config instance

    - #### getQuorumName

          public String getQuorumName()

      Returns the quorum name for operations.
      Returns:
        the quorum name

    - #### setQuorumName

          public ReplicatedMapConfig setQuorumName(String quorumName)

      Sets the quorum name for operations.
      Parameters:
        `quorumName` - the quorum name
      Returns:
        the updated configuration

    - #### getMergePolicy

          public String getMergePolicy()

      Deprecated. since 3.10, please use `getMergePolicyConfig()` and `MergePolicyConfig.getPolicy()`
      Gets the replicated map merge policy `ReplicatedMapMergePolicy`
      Returns:
        the updated replicated map configuration

    - #### setMergePolicy

          public ReplicatedMapConfig setMergePolicy(String mergePolicy)

      Deprecated. since 3.10, please use `setMergePolicyConfig(MergePolicyConfig)`
      Sets the replicated map merge policy `ReplicatedMapMergePolicy`
      Parameters:
        `mergePolicy` - the replicated map merge policy to set
      Returns:
        the updated replicated map configuration

    - #### getMergePolicyConfig

          public MergePolicyConfig getMergePolicyConfig()

      Gets the `MergePolicyConfig` for this replicated map.
      Returns:
        the `MergePolicyConfig` for this replicated map

    - #### setMergePolicyConfig

          public ReplicatedMapConfig setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)

      Sets the `MergePolicyConfig` for this replicated map.
      Returns:
        the updated replicated map configuration

    - #### getProvidedMergeTypes

          public Class getProvidedMergeTypes()

      Specified by:
        `getProvidedMergeTypes` in interface `SplitBrainMergeTypeProvider`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getFactoryId

          public int getFactoryId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns DataSerializableFactory factory ID for this class.
      Specified by:
        `getFactoryId` in interface `IdentifiedDataSerializable`
      Returns:
        factory ID

    - #### getId

          public int getId()

      Description copied from interface: `IdentifiedDataSerializable`
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
        `getId` in interface `IdentifiedDataSerializable`
      Returns:
        type ID

    - #### writeData

          public void writeData(ObjectDataOutput out)
                         throws IOException

      Description copied from interface: `DataSerializable`
      Writes object fields to output stream
      Specified by:
        `writeData` in interface `DataSerializable`
      Parameters:
        `out` - output
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the output stream has been closed.

    - #### readData

          public void readData(ObjectDataInput in)
                        throws IOException

      Description copied from interface: `DataSerializable`
      Reads fields from the input stream
      Specified by:
        `readData` in interface `DataSerializable`
      Parameters:
        `in` - input
      Throws:
        `IOException` - if an I/O error occurs. In particular, an `IOException` may be thrown if the input stream has been closed.

    - #### equals

          public final boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2018. All rights reserved.