com.hazelcast.config

## Class MultiMapConfig

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

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

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

  Configuration for MultiMap.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MultiMapConfig.ValueCollectionType` Type of value collection

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_ASYNC_BACKUP_COUNT` The default number of asynchronous backups for this MultiMap.
    `static int` | `DEFAULT_SYNC_BACKUP_COUNT` The default number of synchronous backups for this MultiMap.
    `static MultiMapConfig.ValueCollectionType` | `DEFAULT_VALUE_COLLECTION_TYPE` Default value collection type of this MultiMap.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiMapConfig()`
    `MultiMapConfig(MultiMapConfig config)`
    `MultiMapConfig(String name)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `MultiMapConfig` | `addEntryListenerConfig(EntryListenerConfig listenerConfig)` Adds an entry listener to this MultiMap (listens for when entries are added or removed).
    `boolean` | `equals(Object o)`
    `MultiMapConfigReadOnly` | `getAsReadOnly()` Deprecated. this method will be removed in 4.0; it is meant for internal usage only
    `int` | `getAsyncBackupCount()` Gets the number of asynchronous backups for this MultiMap.
    `int` | `getBackupCount()` Gets the number of synchronous backups for this MultiMap.
    `List<EntryListenerConfig>` | `getEntryListenerConfigs()` Gets the list of entry listeners (listens for when entries are added or removed) for this MultiMap.
    `int` | `getFactoryId()` Returns DataSerializableFactory factory ID for this class.
    `int` | `getId()` Returns type identifier for this class.
    `MergePolicyConfig` | `getMergePolicyConfig()` Gets the `MergePolicyConfig` for this MultiMap.
    `String` | `getName()` Gets the name of this MultiMap.
    `Class` | `getProvidedMergeTypes()`
    `String` | `getQuorumName()` Returns the quorum name for operations.
    `int` | `getSyncBackupCount()` Deprecated.
    `int` | `getTotalBackupCount()` Gets the total number of backups (synchronous + asynchronous) for this MultiMap.
    `MultiMapConfig.ValueCollectionType` | `getValueCollectionType()` Gets the collection type for the values of this MultiMap.
    `int` | `hashCode()`
    `boolean` | `isBinary()` Checks if the MultiMap is in binary (serialized) form.
    `boolean` | `isStatisticsEnabled()` Checks to see if statistics are enabled for this MultiMap.
    `void` | `readData(ObjectDataInput in)` Reads fields from the input stream
    `MultiMapConfig` | `setAsyncBackupCount(int asyncBackupCount)` Sets the number of asynchronous backups.
    `MultiMapConfig` | `setBackupCount(int backupCount)` Sets the number of synchronous backups.
    `MultiMapConfig` | `setBinary(boolean binary)` Enables or disables binary (serialized) form for this MultiMap.
    `MultiMapConfig` | `setEntryListenerConfigs(List<EntryListenerConfig> listenerConfigs)` Sets the list of entry listeners (listens for when entries are added or removed) for this MultiMap.
    `MultiMapConfig` | `setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)` Sets the `MergePolicyConfig` for this MultiMap.
    `MultiMapConfig` | `setName(String name)` Sets the name of this MultiMap.
    `MultiMapConfig` | `setQuorumName(String quorumName)` Sets the quorum name for operations.
    `MultiMapConfig` | `setStatisticsEnabled(boolean statisticsEnabled)` Enables or disables statistics for this MultiMap.
    `MultiMapConfig` | `setSyncBackupCount(int syncBackupCount)` Deprecated.
    `MultiMapConfig` | `setValueCollectionType(MultiMapConfig.ValueCollectionType valueCollectionType)` Sets the collection type for the values of this MultiMap.
    `MultiMapConfig` | `setValueCollectionType(String valueCollectionType)` Sets the collection type for the values of this MultiMap.
    `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_SYNC_BACKUP_COUNT

          public static final int DEFAULT_SYNC_BACKUP_COUNT

      The default number of synchronous backups for this MultiMap.
      See Also:
        Constant Field Values

    - #### DEFAULT_ASYNC_BACKUP_COUNT

          public static final int DEFAULT_ASYNC_BACKUP_COUNT

      The default number of asynchronous backups for this MultiMap.
      See Also:
        Constant Field Values

    - #### DEFAULT_VALUE_COLLECTION_TYPE

          public static final MultiMapConfig.ValueCollectionType DEFAULT_VALUE_COLLECTION_TYPE

      Default value collection type of this MultiMap.

  - ### Constructor Detail

    - #### MultiMapConfig

          public MultiMapConfig()

    - #### MultiMapConfig

          public MultiMapConfig(String name)

    - #### MultiMapConfig

          public MultiMapConfig(MultiMapConfig config)

  - ### Method Detail

    - #### getName

          public String getName()

      Gets the name of this MultiMap.
      Specified by:
        `getName` in interface `NamedConfig`
      Returns:
        the name of this MultiMap

    - #### setName

          public MultiMapConfig setName(String name)

      Sets the name of this MultiMap.
      Specified by:
        `setName` in interface `NamedConfig`
      Parameters:
        `name` - the name to set for this MultiMap
      Returns:
        this updated MultiMap configuration

    - #### getValueCollectionType

          public MultiMapConfig.ValueCollectionType getValueCollectionType()

      Gets the collection type for the values of this MultiMap.
      Returns:
        the collection type for the values of this MultiMap

    - #### setValueCollectionType

          public MultiMapConfig setValueCollectionType(String valueCollectionType)

      Sets the collection type for the values of this MultiMap.
      Parameters:
        `valueCollectionType` - the collection type for the values of this MultiMap (SET or LIST)
      Returns:
        this updated MultiMap configuration

    - #### setValueCollectionType

          public MultiMapConfig setValueCollectionType(MultiMapConfig.ValueCollectionType valueCollectionType)

      Sets the collection type for the values of this MultiMap.
      Parameters:
        `valueCollectionType` - the collection type for the values of this MultiMap (SET or LIST)
      Returns:
        this updated MultiMap configuration

    - #### addEntryListenerConfig

          public MultiMapConfig addEntryListenerConfig(EntryListenerConfig listenerConfig)

      Adds an entry listener to this MultiMap (listens for when entries are added or removed).
      Parameters:
        `listenerConfig` - the entry listener to add to this MultiMap

    - #### getEntryListenerConfigs

          public List<EntryListenerConfig> getEntryListenerConfigs()

      Gets the list of entry listeners (listens for when entries are added or removed) for this MultiMap.
      Returns:
        the list of entry listeners for this MultiMap

    - #### setEntryListenerConfigs

          public MultiMapConfig setEntryListenerConfigs(List<EntryListenerConfig> listenerConfigs)

      Sets the list of entry listeners (listens for when entries are added or removed) for this MultiMap.
      Parameters:
        `listenerConfigs` - the list of entry listeners for this MultiMap
      Returns:
        this updated MultiMap configuration

    - #### isBinary

          public boolean isBinary()

      Checks if the MultiMap is in binary (serialized) form.
      Returns:
        `true` if the MultiMap is in binary (serialized) form, `false` otherwise

    - #### setBinary

          public MultiMapConfig setBinary(boolean binary)

      Enables or disables binary (serialized) form for this MultiMap.
      Parameters:
        `binary` - `true` to set the MultiMap to binary (serialized) form, `false` otherwise
      Returns:
        this updated MultiMap configuration

    - #### getSyncBackupCount

          @Deprecated
          public int getSyncBackupCount()

      Deprecated.

    - #### setSyncBackupCount

          @Deprecated
          public MultiMapConfig setSyncBackupCount(int syncBackupCount)

      Deprecated.

    - #### getBackupCount

          public int getBackupCount()

      Gets the number of synchronous backups for this MultiMap.
      Returns:
        the number of synchronous backups for this MultiMap

    - #### setBackupCount

          public MultiMapConfig setBackupCount(int backupCount)

      Sets the number of synchronous backups.
      Parameters:
        `backupCount` - the number of synchronous backups to set for this MultiMap
      Returns:
        the current MultiMapConfig
      Throws:
        `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 backups
      See Also:
        `setAsyncBackupCount(int)`

    - #### getAsyncBackupCount

          public int getAsyncBackupCount()

      Gets the number of asynchronous backups for this MultiMap.
      Returns:
        the number of asynchronous backups for this MultiMap

    - #### setAsyncBackupCount

          public MultiMapConfig setAsyncBackupCount(int asyncBackupCount)

      Sets the number of asynchronous backups. 0 means no backups
      Parameters:
        `asyncBackupCount` - the number of asynchronous synchronous backups to set
      Returns:
        the updated MultiMapConfig
      Throws:
        `IllegalArgumentException` - 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 backups
      See Also:
        `setBackupCount(int)`, `getAsyncBackupCount()`

    - #### getTotalBackupCount

          public int getTotalBackupCount()

      Gets the total number of backups (synchronous + asynchronous) for this MultiMap.
      Returns:
        the total number of backups (synchronous + asynchronous) for this MultiMap

    - #### isStatisticsEnabled

          public boolean isStatisticsEnabled()

      Checks to see if statistics are enabled for this MultiMap.
      Returns:
        `true` if statistics are enabled for this MultiMap, `false` otherwise

    - #### setStatisticsEnabled

          public MultiMapConfig setStatisticsEnabled(boolean statisticsEnabled)

      Enables or disables statistics for this MultiMap.
      Parameters:
        `statisticsEnabled` - `true` to enable statistics for this MultiMap, `false` to disable
      Returns:
        the updated MultiMapConfig

    - #### getQuorumName

          public String getQuorumName()

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

    - #### setQuorumName

          public MultiMapConfig setQuorumName(String quorumName)

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

    - #### getMergePolicyConfig

          public MergePolicyConfig getMergePolicyConfig()

      Gets the `MergePolicyConfig` for this MultiMap.
      Returns:
        the `MergePolicyConfig` for this MultiMap

    - #### setMergePolicyConfig

          public MultiMapConfig setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)

      Sets the `MergePolicyConfig` for this MultiMap.
      Returns:
        the updated MultiMapConfig

    - #### 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`

    - #### getAsReadOnly

          public MultiMapConfigReadOnly 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

Copyright © 2020. All rights reserved.