Interface DomainManager

    • Method Detail

      • register

        void register​(String id,
                      RoleChangeHandler roleChangeHandler)
        Register with the domain being managed. This is a non-blocking call.

        Ids must be unique to this manager. Attempting to register the same Id twice will result in an exception.

        The methods specified by the RoleChangeHandler passed to this method must not block.

        Parameters:
        id - the Id to register
        roleChangeHandler - the role change handler to register
      • deregister

        void deregister​(String id)
        Deregister with the domain being managed. This is a non-blocking call.
        Parameters:
        id - the Id to register
      • isRegistered

        boolean isRegistered​(String id)
        Checks if a given Id is registered.
        Parameters:
        id - the Id to check
        Returns:
        true if registered, false otherwise
      • isAnythingRegistered

        boolean isAnythingRegistered()
        Checks if anything is currently registered with the domain being managed.
        Returns:
        true if one or more registrants are currently registered, false otherwise