Interface MastershipAdminService


  • public interface MastershipAdminService
    Service for administering the inventory of device masterships.
    • Method Detail

      • setRole

        CompletableFuture<Void> setRole​(NodeId instance,
                                        DeviceId deviceId,
                                        MastershipRole role)
        Applies the current mastership role for the specified device.
        Parameters:
        instance - controller instance identifier
        deviceId - device identifier
        role - requested role
        Returns:
        future that is completed when the role is set
      • setRoleSync

        default void setRoleSync​(NodeId instance,
                                 DeviceId deviceId,
                                 MastershipRole role)
        Synchronous version of setRole. Applies the current mastership role for the specified device.
        Parameters:
        instance - controller instance identifier
        deviceId - device identifier
        role - requested role
      • balanceRoles

        void balanceRoles()
        Balances the mastership to be shared as evenly as possibly by all online instances.