Package marauroa.server.db.command
Class AbstractDBCommand
java.lang.Object
marauroa.server.db.command.AbstractDBCommand
- All Implemented Interfaces:
DBCommand
- Direct Known Subclasses:
AbstractLogItemEventCommand,BanAccountCommand,DBCommandWithCallback,DeletePendingAchievementDetailsCommand,DumpSpeakerNPCsCommand,DumpZonesCommand,GetCharacterCreationDateCommand,GetPostmanMessagesCommand,LogGameEventCommand,LogKillEventCommand,LogStatisticsCommand,LogTradeEventCommand,QueryCanonicalCharacterNamesCommand,ReadAchievementsForPlayerCommand,ReadCharactersFromHallOfFameCommand,ReadGroupQuestCommand,ReadHallOfFamePointsCommand,ReadPendingAchievementDetailsCommand,SetCharacterStatusCommand,SetOnlineStatusCommand,StoreCharacterCommand,StoreMessageCommand,StoreZoneCommand,UpdateGroupQuestCommand,UpdateSearchIndexCommand,WriteHallOfFamePointsCommand,WriteReachedAchievementCommand
An abstract asynchronous database command.
- Author:
- hendrik, madmetzger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidexecute(DBTransaction transaction)processes the database request.gets the timestamp when this command was added to the queuegets the exception in case one was thrown during processing.voidsetEnqueueTime(Timestamp enqueueTime)sets the timestamp when this command was added to the queuevoidsetException(Exception exception)remembers an exception
-
Constructor Details
-
AbstractDBCommand
public AbstractDBCommand()
-
-
Method Details
-
getException
gets the exception in case one was thrown during processing.- Specified by:
getExceptionin interfaceDBCommand- Returns:
- RuntimeException or
nullin case no exception was thrown.
-
getEnqueueTime
gets the timestamp when this command was added to the queue- Specified by:
getEnqueueTimein interfaceDBCommand- Returns:
- Timestamp
-
setException
remembers an exception- Specified by:
setExceptionin interfaceDBCommand- Parameters:
exception- RuntimeException
-
setEnqueueTime
sets the timestamp when this command was added to the queue- Specified by:
setEnqueueTimein interfaceDBCommand- Parameters:
enqueueTime- Timestamp
-
execute
processes the database request.- Specified by:
executein interfaceDBCommand- Parameters:
transaction- DBTransaction- Throws:
SQLException- in case of an database errorIOException- in case of an input/output error
-