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 Type
    Method
    Description
    int
     
    boolean
    isActive(int userID)
     
    void
    markActive(int userID)
    Mark the user as active
    void
    Mark every user as inactive, essentially clearing this collection.
    void
    markInactive(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.