Class ServerAggregateQueries

java.lang.Object
com.djrapitops.plan.storage.database.queries.ServerAggregateQueries

public class ServerAggregateQueries extends Object
Static method class for queries that count how many entries of particular kinds there are for a server.
  • Method Details

    • baseUserCount

      public static Query<Integer> baseUserCount()
      Count how many users are in the Plan database.
      Returns:
      Count of base users, all users in a network after Plan installation.
    • serverUserCount

      public static Query<Integer> serverUserCount(ServerUUID serverUUID)
      Count how many users are on a server in the network.
      Parameters:
      serverUUID - Server UUID of the Plan server.
      Returns:
      Count of users registered to that server after Plan installation.
    • serverUserCounts

      public static Query<Map<ServerUUID,Integer>> serverUserCounts()
      Count how many users are on each server in the network.

      Please note that counts can overlap as one user can join multiple servers. Use baseUserCount() if you want to count total number of users.

      Returns:
      Map: Server UUID - Count of users registered to that server