Interface NetworkRegistry
- All Known Implementing Classes:
StargateNetworkRegistry
public interface NetworkRegistry
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear all stored networksvoidClose all portals of the networks contained in this registry@Nullable NetworkgetFromName(String name) @Nullable NetworkgetNetwork(String name) Gets the network with the giveniterator()booleannetworkExists(String id) Checks whether the given network name existsbooleannetworkNameExists(String name) voidregisterNetwork(Network network) UseNetworkManagerinstead.voidrenameNetwork(String newId, String oldId) UseNetworkManagerinstead.intsize()stream()voidunregisterNetwork(Network network) UseNetworkManagerinstead.voidUpdate all portals stored in the network
-
Method Details
-
registerNetwork
UseNetworkManagerinstead. 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 UseNetworkManagerinstead. This does not save to database, and is not cross server compatible- Parameters:
newId-oldId-- Throws:
InvalidNameExceptionUnimplementedFlagExceptionNameLengthException
-
unregisterNetwork
UseNetworkManagerinstead. This does not save to database, and is not cross server compatible- Parameters:
network-
-
getNetwork
Gets the network with the given- Parameters:
name-The name of the network to get
- Returns:
The network with the given name
-
networkExists
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
- Returns:
A stream of all networks
-
iterator
- Returns:
An iterator of all networks
-
networkNameExists
- Parameters:
name-The name of the network
- Returns:
Whether any network has that name
-
getFromName
- 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
-