com.hazelcast.cache

## Enum BuiltInCacheMergePolicies

- java.lang.Object
- - java.lang.Enum<BuiltInCacheMergePolicies>
  - - com.hazelcast.cache.BuiltInCacheMergePolicies

- All Implemented Interfaces:
    Serializable, Comparable<BuiltInCacheMergePolicies>

      public enum BuiltInCacheMergePolicies
      extends Enum<BuiltInCacheMergePolicies>

  Enum that represents all built-in `CacheMergePolicy` implementations.

  Note: When a new built-in `CacheMergePolicy` is implemented, its definition should be added here.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `HIGHER_HITS` Cache merge policy that merges cache entries from source to destination cache if the source entry has more hits than the destination one.
    `LATEST_ACCESS` Cache merge policy that merges cache entries from source to destination cache if the source entry has been accessed more recently than the destination entry.
    `PASS_THROUGH` Cache merge policy that merges cache entries from source to destination directly.
    `PUT_IF_ABSENT` Cache merge policy that merges cache entries from source to destination if they don't exist in the destination cache.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BuiltInCacheMergePolicies` | `getDefault()` Gets the definition of the default `CacheMergePolicy`.
    `Class<? extends CacheMergePolicy>` | `getImplementationClass()`
    `String` | `getImplementationClassName()` Gets the name of the implementation class of `CacheMergePolicy`.
    `CacheMergePolicy` | `newInstance()` Create a new instance of `CacheMergePolicy`.
    `static BuiltInCacheMergePolicies` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static BuiltInCacheMergePolicies[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### PASS_THROUGH

          public static final BuiltInCacheMergePolicies PASS_THROUGH

      Cache merge policy that merges cache entries from source to destination directly.

    - #### PUT_IF_ABSENT

          public static final BuiltInCacheMergePolicies PUT_IF_ABSENT

      Cache merge policy that merges cache entries from source to destination if they don't exist in the destination cache.

    - #### HIGHER_HITS

          public static final BuiltInCacheMergePolicies HIGHER_HITS

      Cache merge policy that merges cache entries from source to destination cache if the source entry has more hits than the destination one.

    - #### LATEST_ACCESS

          public static final BuiltInCacheMergePolicies LATEST_ACCESS

      Cache merge policy that merges cache entries from source to destination cache if the source entry has been accessed more recently than the destination entry.

  - ### Method Detail

    - #### values

          public static BuiltInCacheMergePolicies[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (BuiltInCacheMergePolicies c : BuiltInCacheMergePolicies.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static BuiltInCacheMergePolicies valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getImplementationClass

          public Class<? extends CacheMergePolicy> getImplementationClass()

    - #### getImplementationClassName

          public String getImplementationClassName()

      Gets the name of the implementation class of `CacheMergePolicy`.
      Returns:
        the name of the implementation class of `CacheMergePolicy`

    - #### newInstance

          public CacheMergePolicy newInstance()

      Create a new instance of `CacheMergePolicy`.
      Returns:
        the created instance of `CacheMergePolicy`

    - #### getDefault

          public static BuiltInCacheMergePolicies getDefault()

      Gets the definition of the default `CacheMergePolicy`.
      Returns:
        the definition of the default `CacheMergePolicy`

Copyright © 2019. All rights reserved.