Package crow.game.login.api
Interface ActiveUserCollection
- All Known Implementing Classes:
InMemoryActiveUserCollection
public interface ActiveUserCollection
This provides a read-and-write view of the users that are active on the game server.
-
Method Summary
Modifier and TypeMethodDescriptionintbooleanisActive(int userID) voidmarkActive(int userID) Mark the user as activevoidMark every user as inactive, essentially clearing this collection.voidmarkInactive(int userID) Mark the user as inactive.
-
Method Details
-
markActive
void markActive(int userID) Mark the user as active- Parameters:
userID- The user identifier that will be marked active
-
markInactive
void markInactive(int userID) Mark the user as inactive.- Parameters:
userID- The user identifier that will be marked inactive.
-
isActive
boolean isActive(int userID) - Parameters:
userID- The user identifier to query- Returns:
- True if the user is active, false otherwise.
-
activeCount
int activeCount()- Returns:
- The number of active users in the server.
-
markAllInactive
void markAllInactive()Mark every user as inactive, essentially clearing this collection.
-