Comparator is used to compare two map entries in a distributed map. A comparator class with the same functionality should be registered on Hazelcast cluster members in order to be used in PagingPredicates.

Hierarchy

  • Comparator

Methods

Methods

  • This method is used to determine order of entries when sorting.

    • If return value is a negative value, a comes after b,
    • If return value is a positive value, a comes before b,
    • If return value is 0, a and b are indistinguishable in this sorting mechanism. Their order with respect to each other is undefined. This method must always return the same result given the same pair of keys.

    Returns

    order index

    Parameters

    • a: [any, any]

      first entry

    • b: [any, any]

      second entry

    Returns number

Generated using TypeDoc