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 Details

    • getSplitBrainProtection

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

      void ensureNoSplitBrain(@Nullable 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