Class TaskContext
java.lang.Object
org.deltava.jdbc.ConnectionContext
org.deltava.taskman.TaskContext
The execution context for a scheduled task.
- Since:
- 1.0
- Version:
- 10.0
- Author:
- Luke
-
Nested Class Summary
Nested classes/interfaces inherited from class ConnectionContext
ConnectionContext.ConnectionPoolException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the date/time the Task was previously executed.getUser()Returns the User the Task will be executing as.voidsetLastRun(Instant lastRun) Updates the date/time the Task was previously executed.voidUpdates the User the Task will be executing as.Methods inherited from class ConnectionContext
commitTX, getConnection, getDB, hasConnection, release, rollbackTX, setDB, startTXModifier and TypeMethodDescriptionvoidcommitTX()Commits the current JDBC transaction.Reserves a JDBC Connection from the connection pool.getDB()Returns the default database name.booleanReturns whether a JDBC connection has been reserved by this context.longrelease()Returns a JDBC Connection to the connection pool.voidRolls back the current JDBC transaction.voidUpdates the default database name.voidstartTX()Starts a JDBC transaction block, by turning off autoCommit on the reserved Connection.
-
Constructor Details
-
TaskContext
TaskContext()Initializes the task context.
-
-
Method Details
-
getLastRun
Returns the date/time the Task was previously executed.- Returns:
- the last execution date/time, or null if never
-
getUser
Returns the User the Task will be executing as.- Returns:
- a Pilot, or null if the system
-
setLastRun
Updates the date/time the Task was previously executed.- Parameters:
lastRun- the last execution date/time, or null if never
-
setUser
Updates the User the Task will be executing as.- Parameters:
usr- a Pilot, or null if the system
-