Class CPMapConfig

java.lang.Object
com.hazelcast.config.cp.CPMapConfig

public class CPMapConfig extends Object
Configuration for CPMap.
Since:
5.4
  • Field Details

    • DEFAULT_MAX_SIZE_MB

      public static final int DEFAULT_MAX_SIZE_MB
      The default maximum size in MB that a CPMap can total.
      See Also:
  • Constructor Details

    • CPMapConfig

      public CPMapConfig()
      Deprecated.
      exists only for DOM processing.
    • CPMapConfig

      public CPMapConfig(String name)
      Creates a configuration for a CPMap with the given name and the default map capacity of DEFAULT_MAX_SIZE_MB.
      Parameters:
      name - of the CPMap the configuration is applicable for
    • CPMapConfig

      public CPMapConfig(String name, int maxSizeMb)
      Creates a configuration for a CPMap with the given name and maximum capacity in MB as specified by maxSizeMb. DEFAULT_MAX_SIZE_MB.
      Parameters:
      name - of the CPMap the configuration is applicable for
      maxSizeMb - maximum MB capacity of the CPMap
    • CPMapConfig

      public CPMapConfig(CPMapConfig config)
      Copy constructor.
      Parameters:
      config - to copy
  • Method Details

    • getMaxSizeMb

      public int getMaxSizeMb()
      Gets the maximum capacity in MB.
    • setMaxSizeMb

      public CPMapConfig setMaxSizeMb(int maxSizeMb)
      Sets the maximum capacity of the CPMap.
      Parameters:
      maxSizeMb - capacity of the CPMap in MB
      Throws:
      IllegalArgumentException - if maxSizeMb is not positive or exceeds 2000MB
    • getName

      @Nullable public String getName()
      Gets the name of the configuration.
    • setName

      public CPMapConfig setName(String name)
      Sets the name of the configuration.
      Throws:
      NullPointerException - if the name is null
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object