public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implements ExecutionContextDao
ExecutionContext
.
Stores execution context data related to both Step and Job using
a different table for each.DEFAULT_EXIT_MESSAGE_LENGTH, DEFAULT_TABLE_PREFIX
Constructor and Description |
---|
JdbcExecutionContextDao() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
ExecutionContext |
getExecutionContext(JobExecution jobExecution) |
ExecutionContext |
getExecutionContext(StepExecution stepExecution) |
void |
saveExecutionContext(JobExecution jobExecution)
Persist the execution context associated with the given jobExecution,
persistent entry for the context should not exist yet.
|
void |
saveExecutionContext(StepExecution stepExecution)
Persist the execution context associated with the given stepExecution,
persistent entry for the context should not exist yet.
|
void |
saveExecutionContexts(java.util.Collection<StepExecution> stepExecutions)
Persist the execution context associated with each stepExecution in a given collection,
persistent entry for the context should not exist yet.
|
void |
setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler) |
void |
setSerializer(ExecutionContextSerializer serializer)
Setter for
Serializer implementation |
void |
setShortContextLength(int shortContextLength)
The maximum size that an execution context can have and still be stored
completely in short form in the column
SHORT_CONTEXT . |
void |
updateExecutionContext(JobExecution jobExecution)
Persist the updates of execution context associated with the given
jobExecution.
|
void |
updateExecutionContext(StepExecution stepExecution)
Persist the updates of execution context associated with the given
stepExecution.
|
getClobTypeToUse, getJdbcTemplate, getQuery, getTablePrefix, setClobTypeToUse, setJdbcTemplate, setTablePrefix
public void setSerializer(ExecutionContextSerializer serializer)
Serializer
implementationserializer
- ExecutionContextSerializer
instance to use.public void setShortContextLength(int shortContextLength)
SHORT_CONTEXT
.
Anything longer than this will overflow into large-object storage, and
the first part only will be retained in the short form for readability.
Default value is 2500. Clients using multi-bytes charsets on the database
server may need to reduce this value to as little as half the value of
the column size.shortContextLength
- int max length of the short context.public ExecutionContext getExecutionContext(JobExecution jobExecution)
getExecutionContext
in interface ExecutionContextDao
jobExecution
- JobExecution
instance that contains the context.public ExecutionContext getExecutionContext(StepExecution stepExecution)
getExecutionContext
in interface ExecutionContextDao
stepExecution
- StepExecution
instance that contains the context.public void updateExecutionContext(JobExecution jobExecution)
ExecutionContextDao
updateExecutionContext
in interface ExecutionContextDao
jobExecution
- JobExecution
instance that contains the context.public void updateExecutionContext(StepExecution stepExecution)
ExecutionContextDao
updateExecutionContext
in interface ExecutionContextDao
stepExecution
- StepExecution
instance that contains the context.public void saveExecutionContext(JobExecution jobExecution)
ExecutionContextDao
saveExecutionContext
in interface ExecutionContextDao
jobExecution
- JobExecution
instance that contains the context.public void saveExecutionContext(StepExecution stepExecution)
ExecutionContextDao
saveExecutionContext
in interface ExecutionContextDao
stepExecution
- StepExecution
instance that contains the context.public void saveExecutionContexts(java.util.Collection<StepExecution> stepExecutions)
ExecutionContextDao
saveExecutionContexts
in interface ExecutionContextDao
stepExecutions
- a collection of StepExecution
s that contain
the contexts.public void setLobHandler(org.springframework.jdbc.support.lob.LobHandler lobHandler)
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class AbstractJdbcBatchMetadataDao
java.lang.Exception