Interface SplitBrainProtectionService


  • public interface SplitBrainProtectionService
    Split brain protection service can be used to trigger cluster split brain protections at any time. Normally split brain protections are done when any change happens on the member list.
    • Method Detail

      • getSplitBrainProtection

        @Nonnull
        SplitBrainProtection getSplitBrainProtection​(@Nonnull
                                                     java.lang.String splitBrainProtectionName)
                                              throws java.lang.IllegalArgumentException
        Returns the SplitBrainProtection instance for a given split brain protection name.
        Parameters:
        splitBrainProtectionName - name of the split brain protection
        Returns:
        SplitBrainProtection
        Throws:
        java.lang.IllegalArgumentException - if no split brain protection found for given name
        java.lang.NullPointerException - if splitBrainProtectionName is null
      • ensureNoSplitBrain

        void ensureNoSplitBrain​(@Nullable
                                java.lang.String splitBrainProtectionName,
                                @Nonnull
                                SplitBrainProtectionOn requiredSplitBrainProtectionPermissionType)
                         throws SplitBrainProtectionException
        Ensures that the split brain protection with the given name is present. Throws a SplitBrainProtectionException if split brain protection not present. Does not throw exception if splitBrainProtectionName null or split brain protection undefined. If (requiredSplitBrainProtectionPermissionType == READ) -> will check for presence of READ or READ_WRITE split brain protection
        If (requiredSplitBrainProtectionPermissionType == WRITE) -> will check for presence of WRITE or READ_WRITE split brain protection
        If (requiredSplitBrainProtectionPermissionType == READ_WRITE) -> will check for presence of READ_WRITE split brain protection
        Parameters:
        splitBrainProtectionName - split brain protection name to ensure, can be null or empty
        requiredSplitBrainProtectionPermissionType - type of split brain protection required
        Throws:
        SplitBrainProtectionException - if split brain protection defined and not present