Interface NetworkNodeContainer

All Known Subinterfaces:
InWorldNetworkNodeContainer
All Known Implementing Classes:
InWorldNetworkNodeContainerImpl
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@API(status=STABLE, since="2.0.0-milestone.1.0") @FunctionalInterface public interface NetworkNodeContainer
  • Method Summary

    Modifier and Type
    Method
    Description
    default Object
    If this container needs to be indexed by the network graph, so it can be queried quickly (by key), you can return a key here.
     
    default int
    The container priority determines the order in which the remainder containers as the result of a network split are re-initialized with a new network.
  • Method Details

    • getNode

      NetworkNode getNode()
    • createKey

      @Nullable default Object createKey()
      If this container needs to be indexed by the network graph, so it can be queried quickly (by key), you can return a key here. The key must be kept stable, and must stay the same for the lifetime of the container. If it changes after adding it into the graph, the container would not be removed from the key index when the container is removed! The container can be queried by GraphNetworkComponent.getContainer(Object).
      Returns:
      the key, or null if indexing is not required
    • getPriority

      default int getPriority()
      The container priority determines the order in which the remainder containers as the result of a network split are re-initialized with a new network. A container with the highest priority will be re-initialized first.
      Returns:
      the priority