de.stefan1200.jts3servermod.interfaces

## Interface ClientDatabaseCache_Interface

-     public interface ClientDatabaseCache_Interface

  Interface of the ClientDatabaseCache class, which allows you to access the ClientDatabaseCache methods.
  The author of the JTS3ServerMod is not responsible for any damage or data loss!
  E-Mail:
  info@stefan1200.de
  Homepage:
  http://www.stefan1200.de
  Author:
    Stefan Martens

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `deleteClientFromCache(int clientDBID)` Delete a client from the client database cache.
    `int` | `getClientCount()` Returns the cached client count.
    `int` | `getCreatedAt(int clientDBID)` Get the client created at time from client database id.
    `int` | `getDatabaseID(String clientUniqueID)` Get the client database id from client unique id.
    `String` | `getDescription(int clientDBID)` Get the client description from client database id.
    `String` | `getLastIP(int clientDBID)` Get the last client IP address from client database id.
    `int` | `getLastOnline(int clientDBID)` Get the client last online time from client database id.
    `String` | `getNickname(int clientDBID)` Get the client nickname from client database id.
    `String` | `getUniqueID(int clientDBID)` Get the client unique id from client database id.
    `boolean` | `isCacheLocal()` Check if a local cache of the TS3 client database exists.
    `boolean` | `isUpdateRunning()` Check if the local client database cache is still updating.
    `Vector<Integer>` | `searchClientNickname(String search)` Search for clients with a specified client name or unique id.
    `Vector<Integer>` | `searchDescription(String search)` Search for clients with a specified description.
    `Vector<HashMap<String,Integer>>` | `searchInactiveClients(int daysInactive, int sortOrder)` Search for clients who was not online in the last X days.
    `Vector<Integer>` | `searchIPAddress(String search)` Search for clients with a specified IP address.

- - ### Method Detail

    - #### deleteClientFromCache

          boolean deleteClientFromCache(int clientDBID)

      Delete a client from the client database cache. This has no effect to the Teamspeak 3 database.
      Parameters:
        `clientDBID` - Client database id
      Returns:
        Returns `true`, if the client was found and removed from the local Client Database Cache, `false` if not.
      Since:
        6.3

    - #### getClientCount

          int getClientCount()

      Returns the cached client count.
      Returns:
        Client count in cache or -1 if there is no local client database cache.
      Since:
        5.5

    - #### getCreatedAt

          int getCreatedAt(int clientDBID)

      Get the client created at time from client database id.
      Notice:
      If a local cache does not exists, this search do an online search on the TS3 server.
      Parameters:
        `clientDBID` - Client database id
      Returns:
        The time stamp of the client creation time in seconds.

    - #### getDatabaseID

          int getDatabaseID(String clientUniqueID)

      Get the client database id from client unique id.
      Notice:
      If a local cache does not exists, this search do an online search on the TS3 server.
      Parameters:
        `clientUniqueID` - Client Unique ID
      Returns:
        The client database id
      Since:
        5.3

    - #### getDescription

          String getDescription(int clientDBID)

      Get the client description from client database id.
      Notice:
      If a local cache does not exists, this search do an online search on the TS3 server.
      Parameters:
        `clientDBID` - Client database id
      Returns:
        The client description

    - #### getLastIP

          String getLastIP(int clientDBID)

      Get the last client IP address from client database id.
      Notice:
      If a local cache does not exists, this search do an online search on the TS3 server.
      Parameters:
        `clientDBID` - Client database id
      Returns:
        The last IP address of the client.
      Since:
        5.0

    - #### getLastOnline

          int getLastOnline(int clientDBID)

      Get the client last online time from client database id.
      Notice:
      If a local cache does not exists, this search do an online search on the TS3 server. The online search will return the last connected time and not the last online time!
      Parameters:
        `clientDBID` - Client database id
      Returns:
        The time stamp of the client last online time or last connected time in seconds.

    - #### getNickname

          String getNickname(int clientDBID)

      Get the client nickname from client database id.
      Notice:
      If a local cache does not exists, this search do an online search on the TS3 server.
      Parameters:
        `clientDBID` - Client database id
      Returns:
        The client nickname

    - #### getUniqueID

          String getUniqueID(int clientDBID)

      Get the client unique id from client database id.
      Notice:
      If a local cache does not exists, this search do an online search on the TS3 server.
      Parameters:
        `clientDBID` - Client database id
      Returns:
        The client unique id

    - #### isCacheLocal

          boolean isCacheLocal()

      Check if a local cache of the TS3 client database exists.
      Returns:
        Returns `true`, if a local cache of the TS3 client database exists.
      Since:
        5.5

    - #### isUpdateRunning

          boolean isUpdateRunning()

      Check if the local client database cache is still updating.
      Returns:
        Returns `true`, if the cache is still updating.

    - #### searchClientNickname

          Vector<Integer> searchClientNickname(String search)

      Search for clients with a specified client name or unique id. Star wildcard character is possible at the client name, example: foo*bar
      Notice:
      If a local cache does not exists, this search do an online search on the TS3 server.
      Parameters:
        `search` - The search string with the client name (or parts of it) or the unique id.
      Returns:
        Returns a Vector with client database ids.

    - #### searchDescription

          Vector<Integer> searchDescription(String search)

      Search for clients with a specified description. Star wildcard character is possible, example: foo*bar
      Notice:
      A local client database cache is required!
      Parameters:
        `search` - The search string with the description (or parts of it)
      Returns:
        Returns a Vector with client database ids.
      Since:
        6.2

    - #### searchInactiveClients

          Vector<HashMap<String,Integer>> searchInactiveClients(int daysInactive,
                                                                int sortOrder)

      Search for clients who was not online in the last X days.
      Notice:
      A local client database cache is required!
      Parameters:
        `daysInactive` - Days of inactivity
        `sortOrder` - Set to `1` to get the list sorted from oldest to youngest last online time, `0` for youngest to oldest sorting, `-1` to disable sorting.
      Returns:
        Returns a Vector with HashMaps containing the client database ids (cldbid) and last online time (lastonline).
      Since:
        3.5.1

    - #### searchIPAddress

          Vector<Integer> searchIPAddress(String search)

      Search for clients with a specified IP address. Star wildcard character is possible, example: 127.0.*
      Notice:
      A local client database cache is required!
      Parameters:
        `search` - The search string with the ip address (or parts of it)
      Returns:
        Returns a Vector with client database ids.
      Since:
        5.0