com.hazelcast.config

## Class MapStoreConfig

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

- All Implemented Interfaces:
    DataSerializable, IdentifiedDataSerializable
  Direct Known Subclasses:
    MapStoreConfigReadOnly

      public class MapStoreConfig
      extends Object
      implements IdentifiedDataSerializable

  Contains the configuration for a Map Store.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MapStoreConfig.InitialLoadMode` Initial load module

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_WRITE_BATCH_SIZE` Default batch size for writing
    `static boolean` | `DEFAULT_WRITE_COALESCING` Default write coalescing behavior
    `static int` | `DEFAULT_WRITE_DELAY_SECONDS` Default delay seconds for writing

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapStoreConfig()`
    `MapStoreConfig(MapStoreConfig config)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `MapStoreConfigReadOnly` | `getAsReadOnly()` Deprecated. this method will be removed in 4.0; it is meant for internal usage only
    `String` | `getClassName()` Returns the name of the MapStore implementation class
    `String` | `getFactoryClassName()` Returns the name of the MapStoreFactory implementation class
    `int` | `getFactoryId()` Returns DataSerializableFactory factory ID for this class.
    `Object` | `getFactoryImplementation()` Returns the map store factory implementation object.
    `int` | `getId()` Returns type identifier for this class.
    `Object` | `getImplementation()` Returns the map store implementation object.
    `MapStoreConfig.InitialLoadMode` | `getInitialLoadMode()` Returns the initial load mode.
    `Properties` | `getProperties()` Returns all the properties
    `String` | `getProperty(String name)` Returns the given property
    `int` | `getWriteBatchSize()` Returns the number of operations to be included in each batch processing round.
    `int` | `getWriteDelaySeconds()` Returns the number of seconds to delay the store writes.
    `int` | `hashCode()`
    `boolean` | `isEnabled()` Returns if this configuration is enabled
    `boolean` | `isWriteCoalescing()` Returns `true` if write-coalescing is enabled.
    `void` | `readData(ObjectDataInput in)` Reads fields from the input stream
    `MapStoreConfig` | `setClassName(String className)` Sets the name for the MapStore implementation class
    `MapStoreConfig` | `setEnabled(boolean enabled)` Enables and disables this configuration
    `MapStoreConfig` | `setFactoryClassName(String factoryClassName)` Sets the name for the MapStoreFactory implementation class
    `MapStoreConfig` | `setFactoryImplementation(Object factoryImplementation)` Sets the map store factory implementation object.
    `MapStoreConfig` | `setImplementation(Object implementation)` Sets the map store implementation object
    `MapStoreConfig` | `setInitialLoadMode(MapStoreConfig.InitialLoadMode initialLoadMode)` Sets the initial load mode.
    `MapStoreConfig` | `setProperties(Properties properties)` Sets the properties
    `MapStoreConfig` | `setProperty(String name, String value)`
    `MapStoreConfig` | `setWriteBatchSize(int writeBatchSize)` Sets the number of operations to be included in each batch processing round.
    `MapStoreConfig` | `setWriteCoalescing(boolean writeCoalescing)` Setting `writeCoalescing` is meaningful if you are using write-behind `MapStore`.
    `MapStoreConfig` | `setWriteDelaySeconds(int writeDelaySeconds)` Sets the number of seconds to delay before writing (storing) the dirty records
    `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_WRITE_DELAY_SECONDS

          public static final int DEFAULT_WRITE_DELAY_SECONDS

      Default delay seconds for writing
      See Also:
        Constant Field Values

    - #### DEFAULT_WRITE_BATCH_SIZE

          public static final int DEFAULT_WRITE_BATCH_SIZE

      Default batch size for writing
      See Also:
        Constant Field Values

    - #### DEFAULT_WRITE_COALESCING

          public static final boolean DEFAULT_WRITE_COALESCING

      Default write coalescing behavior
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MapStoreConfig

          public MapStoreConfig()

    - #### MapStoreConfig

          public MapStoreConfig(MapStoreConfig config)

  - ### Method Detail

    - #### getAsReadOnly

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

    - #### getClassName

          public String getClassName()

      Returns the name of the MapStore implementation class
      Returns:
        the name of the MapStore implementation class

    - #### setClassName

          public MapStoreConfig setClassName(String className)

      Sets the name for the MapStore implementation class
      Parameters:
        `className` - the name to set for the MapStore implementation class

    - #### getFactoryClassName

          public String getFactoryClassName()

      Returns the name of the MapStoreFactory implementation class
      Returns:
        the name of the MapStoreFactory implementation class

    - #### setFactoryClassName

          public MapStoreConfig setFactoryClassName(String factoryClassName)

      Sets the name for the MapStoreFactory implementation class
      Parameters:
        `factoryClassName` - the name to set for the MapStoreFactory implementation class

    - #### getWriteDelaySeconds

          public int getWriteDelaySeconds()

      Returns the number of seconds to delay the store writes.
      Returns:
        the number of seconds to delay the store writes

    - #### setWriteDelaySeconds

          public MapStoreConfig setWriteDelaySeconds(int writeDelaySeconds)

      Sets the number of seconds to delay before writing (storing) the dirty records

      Default value is 0.

      Parameters:
        `writeDelaySeconds` - the number of seconds to delay before writing the dirty records

    - #### getWriteBatchSize

          public int getWriteBatchSize()

      Returns the number of operations to be included in each batch processing round.
      Returns:
        write batch size: the number of operations to be included in each batch processing round

    - #### setWriteBatchSize

          public MapStoreConfig setWriteBatchSize(int writeBatchSize)

      Sets the number of operations to be included in each batch processing round.

      Default value is 1.

      Parameters:
        `writeBatchSize` - the number of operations to be included in each batch processing round

    - #### isEnabled

          public boolean isEnabled()

      Returns if this configuration is enabled
      Returns:
        `true` if this configuration is enabled, `false` otherwise

    - #### setEnabled

          public MapStoreConfig setEnabled(boolean enabled)

      Enables and disables this configuration
      Parameters:
        `enabled` - `true` to enables this configuration, `false` to disable

    - #### setImplementation

          public MapStoreConfig setImplementation(Object implementation)

      Sets the map store implementation object
      Parameters:
        `implementation` - the map store implementation object to set
      Returns:
        this MapStoreConfig instance

    - #### getImplementation

          public Object getImplementation()

      Returns the map store implementation object.
      Returns:
        the map store implementation object

    - #### setFactoryImplementation

          public MapStoreConfig setFactoryImplementation(Object factoryImplementation)

      Sets the map store factory implementation object.
      Parameters:
        `factoryImplementation` - the factory implementation object
      Returns:
        this MapStoreConfig instance

    - #### getFactoryImplementation

          public Object getFactoryImplementation()

      Returns the map store factory implementation object.
      Returns:
        the map store factory implementation object

    - #### setProperty

          public MapStoreConfig setProperty(String name,
                                            String value)

    - #### getProperty

          public String getProperty(String name)

      Returns the given property
      Returns:
        the given property

    - #### getProperties

          public Properties getProperties()

      Returns all the properties
      Returns:
        all the properties

    - #### setProperties

          public MapStoreConfig setProperties(Properties properties)

      Sets the properties
      Parameters:
        `properties` - the properties to be set
      Returns:
        this MapStoreConfig

    - #### getInitialLoadMode

          public MapStoreConfig.InitialLoadMode getInitialLoadMode()

      Returns the initial load mode.
      Returns:
        the initial load mode object

    - #### setInitialLoadMode

          public MapStoreConfig setInitialLoadMode(MapStoreConfig.InitialLoadMode initialLoadMode)

      Sets the initial load mode.
      - LAZY: Default load mode where load is async
      - EAGER: load mode where load is blocked till all partitions are loaded
      Parameters:
        `initialLoadMode` - the initial load mode object

    - #### isWriteCoalescing

          public boolean isWriteCoalescing()

      Returns `true` if write-coalescing is enabled.
      Returns:
        `true` if coalescing enabled, `false` otherwise
      See Also:
        `setWriteCoalescing(boolean)`

    - #### setWriteCoalescing

          public MapStoreConfig setWriteCoalescing(boolean writeCoalescing)

      Setting `writeCoalescing` is meaningful if you are using write-behind `MapStore`.

      When `writeCoalescing` is `true`, only the latest store operation on a key in the `writeDelaySeconds` time-window will be reflected to `MapStore`.

      Default value is true.

      Parameters:
        `writeCoalescing` - `true` to enable write-coalescing, `false` otherwise
      See Also:
        `GroupProperty.MAP_WRITE_BEHIND_QUEUE_CAPACITY`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public final boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` 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.

Copyright © 2018. All rights reserved.