Interface NetworkRegistry

All Known Implementing Classes:
StargateNetworkRegistry

public interface NetworkRegistry
  • Method Details

    • registerNetwork

      @Internal void registerNetwork(Network network)
      Use NetworkManager instead. This does not save to database, and is not cross server compatible
      Parameters:
      network -
    • renameNetwork

      @Internal void renameNetwork(String newId, String oldId) throws InvalidNameException, UnimplementedFlagException, NameLengthException
      Use NetworkManager instead. This does not save to database, and is not cross server compatible
      Parameters:
      newId -
      oldId -
      Throws:
      InvalidNameException
      UnimplementedFlagException
      NameLengthException
    • unregisterNetwork

      void unregisterNetwork(Network network)
      Use NetworkManager instead. This does not save to database, and is not cross server compatible
      Parameters:
      network -
    • getNetwork

      @Nullable @Nullable Network getNetwork(String name)
      Gets the network with the given
      Parameters:
      name -

      The name of the network to get

      Returns:

      The network with the given name

    • networkExists

      boolean networkExists(String id)
      Checks whether the given network name exists
      Parameters:
      id -

      The network name to check

      Returns:

      True if the network exists

    • clear

      void clear()
      Clear all stored networks
    • updatePortals

      void updatePortals()
      Update all portals stored in the network
    • stream

      Stream<Network> stream()
      Returns:

      A stream of all networks

    • iterator

      Iterator<Network> iterator()
      Returns:

      An iterator of all networks

    • networkNameExists

      boolean networkNameExists(String name)
      Parameters:
      name -

      The name of the network

      Returns:

      Whether any network has that name

    • getFromName

      @Nullable @Nullable Network getFromName(String name)
      Parameters:
      name -

      The name of the network

      Returns:

      The network of that name

    • closeAllPortals

      void closeAllPortals()
      Close all portals of the networks contained in this registry
    • size

      int size()
      Returns:

      The amount of networks stored in this registry