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
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
execute(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.void
setEnqueueTime(Timestamp enqueueTime)
sets the timestamp when this command was added to the queuevoid
setException(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:
getException
in interfaceDBCommand
- Returns:
- RuntimeException or
null
in case no exception was thrown.
-
getEnqueueTime
gets the timestamp when this command was added to the queue- Specified by:
getEnqueueTime
in interfaceDBCommand
- Returns:
- Timestamp
-
setException
remembers an exception- Specified by:
setException
in interfaceDBCommand
- Parameters:
exception
- RuntimeException
-
setEnqueueTime
sets the timestamp when this command was added to the queue- Specified by:
setEnqueueTime
in interfaceDBCommand
- Parameters:
enqueueTime
- Timestamp
-
execute
processes the database request.- Specified by:
execute
in interfaceDBCommand
- Parameters:
transaction
- DBTransaction- Throws:
SQLException
- in case of an database errorIOException
- in case of an input/output error
-