com.hazelcast.quorum

## Interface QuorumService

-     public interface QuorumService

  Quorum service can be used to trigger cluster quorums at any time. Normally quorums are done when any change happens on the member list. 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
    --- | ---
    `void` | `ensureQuorumPresent(String quorumName, QuorumType requiredQuorumPermissionType)` Ensures that the quorum with the given name is present.
    `Quorum` | `getQuorum(String quorumName)` Returns the `Quorum` instance for a given quorum name.

- - ### Method Detail

    - #### getQuorum

          Quorum getQuorum(String quorumName)
                    throws IllegalArgumentException

      Returns the `Quorum` instance for a given quorum name.
      Parameters:
        `quorumName` - name of the quorum
      Returns:
        `Quorum`
      Throws:
        `IllegalArgumentException` - if no quorum found for given name
        `NullPointerException` - if quorumName is null

    - #### ensureQuorumPresent

          void ensureQuorumPresent(String quorumName,
                                   QuorumType requiredQuorumPermissionType)
                            throws QuorumException

      Ensures that the quorum with the given name is present. Throws a QuorumException if quorum not present. Does not throw exception if quorumName null or quorum undefined. If (requiredQuorumPermissionType == READ) -> will check for presence of READ or READ_WRITE quorum
      If (requiredQuorumPermissionType == WRITE) -> will check for presence of WRITE or READ_WRITE quorum
      If (requiredQuorumPermissionType == READ_WRITE) -> will check for presence of READ_WRITE quorum
      Parameters:
        `quorumName` - quorum name to ensure, can be null or empty
        `requiredQuorumPermissionType` - type of quorum required
      Throws:
        `QuorumException` - if quorum defined and not present

Copyright © 2020. All rights reserved.