Package crow.game.omnisrv
Class InMemoryServerCollection
java.lang.Object
crow.game.omnisrv.InMemoryServerCollection
- All Implemented Interfaces:
ServerCollection
In-memory implementation of
ServerCollection, responsible for keeping track of known
servers.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(CharServer srv) all()voidremoveByName(String name) Remove a server, given the name of the servers.voidSet the user count for the given server name
-
Constructor Details
-
InMemoryServerCollection
public InMemoryServerCollection()
-
-
Method Details
-
all
- Specified by:
allin interfaceServerCollection- Returns:
- a read-only view of all the kwown servers.
-
add
- Specified by:
addin interfaceServerCollection- Parameters:
srv- A new server to add to our known servers.
-
removeByName
Description copied from interface:ServerCollectionRemove a server, given the name of the servers.- Specified by:
removeByNamein interfaceServerCollection- Parameters:
name- The name of the server
-
setCount
Description copied from interface:ServerCollectionSet the user count for the given server name- Specified by:
setCountin interfaceServerCollection- Parameters:
name- The name of the servercount- The amount of users.
-