Interface QuitLogger

All Known Implementing Classes:
QuitLoggerProvider

public sealed interface QuitLogger permits QuitLoggerProvider
QuitLogger interface defines the contract for logging and managing quit dates of users.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    createQuitDate(int userId)
    Logs the quit date for a user identified by the given userId.
    void
    deleteUser(int userId)
    Deletes the user identified by the given userId from the system.
    getQuitDate(int timeId, int userId)
    Retrieves the quit date for a user identified by the given userId and timeId.
    long
    getQuitTime(int timeId, int userId)
    Retrieves the quit time for a user identified by the given userId and timeId.
    getTimeIds(int userId)
    Retrieves a list of time IDs associated with a specific user.
  • Method Details

    • createQuitDate

      int createQuitDate(int userId)
      Logs the quit date for a user identified by the given userId.
      Parameters:
      userId - The ID of the user whose quit date is to be recorded
    • deleteUser

      void deleteUser(int userId)
      Deletes the user identified by the given userId from the system.
      Parameters:
      userId - The ID of the user to be deleted.
    • getTimeIds

      List<Integer> getTimeIds(int userId)
      Retrieves a list of time IDs associated with a specific user.
      Parameters:
      userId - The ID of the user whose time IDs are to be retrieved.
      Returns:
      A list of time IDs associated with the given user ID.
    • getQuitTime

      long getQuitTime(int timeId, int userId)
      Retrieves the quit time for a user identified by the given userId and timeId.
      Parameters:
      timeId - The ID of the time record.
      userId - The ID of the user whose quit time is being retrieved.
      Returns:
      The quit time in milliseconds since epoch for the specified user and timeId.
    • getQuitDate

      String getQuitDate(int timeId, int userId)
      Retrieves the quit date for a user identified by the given userId and timeId.
      Parameters:
      timeId - The ID of the time record.
      userId - The ID of the user whose quit date is being retrieved.
      Returns:
      The formatted quit date string for the specified user and timeId.