Interface DBCommand

All Known Implementing Classes:
AbstractDBCommand, AbstractLogItemEventCommand, BanAccountCommand, DBCommandWithCallback, DeletePendingAchievementDetailsCommand, DumpSpeakerNPCsCommand, DumpZonesCommand, GetCharacterCreationDateCommand, GetPostmanMessagesCommand, LoadActiveCharacterCommand, LoadAllActiveCharactersCommand, LoadAllCharactersCommand, LoadBanListCommand, LoadCharacterCommand, LogGameEventCommand, LoginCommand, LogKillEventCommand, LogMergeItemEventCommand, LogSimpleItemEventCommand, LogSplitItemEventCommand, LogStatisticsCommand, LogTradeEventCommand, QueryCanonicalCharacterNamesCommand, ReadAchievementsForPlayerCommand, ReadCharactersFromHallOfFameCommand, ReadGroupQuestCommand, ReadHallOfFamePointsCommand, ReadPendingAchievementDetailsCommand, SetCharacterStatusCommand, SetOnlineStatusCommand, StoreCharacterCommand, StoreMessageCommand, StoreZoneCommand, UpdateGroupQuestCommand, UpdateSearchIndexCommand, WriteHallOfFamePointsCommand, WriteReachedAchievementCommand

public interface DBCommand
a database command that can be processed asynchronously.
Author:
hendrik, madmetzger
  • Method Details

    • getException

      Exception getException()
      gets the exception in case one was thrown during processing.
      Returns:
      RuntimeException or null in case no exception was thrown.
    • execute

      void execute(DBTransaction transaction) throws SQLException, IOException
      processes the database request.
      Parameters:
      transaction - DBTransaction
      Throws:
      SQLException - in case of an database error
      IOException - in case of an input/output error
    • getEnqueueTime

      Timestamp getEnqueueTime()
      gets the timestamp when this command was added to the queue
      Returns:
      Timestamp
    • setException

      void setException(Exception exception)
      remembers an exception
      Parameters:
      exception - RuntimeException
    • setEnqueueTime

      void setEnqueueTime(Timestamp enqueueTime)
      sets the timestamp when this command was added to the queue
      Parameters:
      enqueueTime - Timestamp