com.hazelcast.quorum

## Interface QuorumFunction

-     public interface QuorumFunction

  A function that can be used to conclude absence/presence of quorum. The quorum function is consulted:
  - When a cluster membership change occurs (member added or removed)
  - Whenever a hearbeat is received from a member, in case the `QuorumFunction` also implements `HeartbeatAware`
  A `QuorumFunction` that implements `HeartbeatAware` will be also notified of heartbeats. Additionally, a `QuorumFunction` that implements `MembershipListener` will be notified of membership events. All listener invocations are executed before the `QuorumFunction`'s `apply(Collection)` method is invoked. IMPORTANT: The term "quorum" simply refers to the count of members in the cluster required for an operation to succeed. It does NOT refer to an implementation of Paxos or Raft protocols as used in many NoSQL and distributed systems. The mechanism it provides in Hazelcast protects the user in case the number of nodes in a cluster drops below the specified one.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `apply(Collection<Member> members)` Determines if quorum is present based on the current list of members in the cluster.

- - ### Method Detail

    - #### apply

          boolean apply(Collection<Member> members)

      Determines if quorum is present based on the current list of members in the cluster. Lite members are excluded and only data members are provided to this method.
      This method should not block nor execute time-consuming operations, otherwise it may stall other quorum function invocations.
      Parameters:
        `members` - snapshot of current member list
      Returns:
        boolean presence/absence of quorum

Copyright © 2019. All rights reserved.