Interface NetworkBuilder


@API(status=STABLE, since="2.0.0-milestone.1.0") public interface NetworkBuilder
Manages the network state of a NetworkNode. Performs merge, split and remove operations as necessary.
  • Method Details

    • initialize

      boolean initialize(NetworkNodeContainer container, ConnectionProvider connectionProvider)
      Initializes a not yet connected network node container. If the network node already has an associated Network, calling this will do nothing. This will perform a merge operation.
      Parameters:
      container - the container
      connectionProvider - the connection provider
      Returns:
      true if the container has no network yet, and the initialization succeeded, false otherwise
    • remove

      void remove(NetworkNodeContainer container, ConnectionProvider connectionProvider)
      Removes a container from its network. Will remove the network if the container is the last container in the network, or otherwise it performs a split operation.
      Parameters:
      container - the container
      connectionProvider - the connection provider
    • update

      void update(NetworkNodeContainer container, ConnectionProvider connectionProvider)
      Updates the network associated with the given container. Makes the network state adapt to connection changes of an already connected container. Will perform a split and/or a merge operation.
      Parameters:
      container - the container
      connectionProvider - the connection provider