public interface IContext
Modifier and Type | Interface and Description |
---|---|
static class |
IContext.RunType
RunType specifies the type of tasks actually executed when running tasks.
|
Modifier and Type | Field and Description |
---|---|
static String |
LOG_BEGIN
LOG_BEGIN: Begin prefix used in log messages to mark start of actions when running tasks.
Default is ">>> ". |
static String |
LOG_END
LOG_END: End prefix used in log messages to mark end of actions when running tasks.
Default is "<<< ". |
static String |
LOG_INDENTATION
LOG_INDENTATION: Indentation used in log messages reporting progress when running tasks.
Default is two spaces. |
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection()
Get a JDBC connection based on the configuration.
|
default String |
getLogBegin()
Get task begin prefix.
|
default String |
getLogEnd()
Get task end prefix.
|
default String |
getLogIndentation()
Get log indentation string.
|
String[] |
getRunParams()
Returns the parameter values to be used by Erase or Sar tasks.
|
IContext.RunType |
getRunType()
Get type of tasks that will be executed by ITask.run(IContext).
|
ISarWriter |
getSarWriter()
Writer to receive output to Subject Access Request.
|
boolean |
isAutoCommit()
Is it using auto-commit mode?
Please note that many operations involving setting unique keys may not work in autocommit mode. |
boolean |
isRepeatableRandom()
TRUE if random sequence should repeat each time it is run, in order to get predictable results.
|
void |
setAutoCommit(boolean autocommit)
Sets the AutoCommit mode.
AutoCommit (true) - commits for every insert/update and is easier to debug Commit (false) - uses batch inserts/updates which is generally faster |
void |
setRepeatableRandom(boolean repeatable)
Set to TRUE if random sequence should repeat each time it is run, in order to get predictable results.
|
void |
setRunParams(String[] parameter)
Sets the values of the list of %PARAMETER% parameters to be used in Erase or Sar tasks.
|
void |
setRunType(IContext.RunType run)
Set type of tasks to execute when tasks is executed by ITask.run(IContext).
|
static final String LOG_INDENTATION
static final String LOG_BEGIN
static final String LOG_END
Connection getConnection() throws Throwable
Throwable
- SQL errorboolean isAutoCommit()
void setAutoCommit(boolean autocommit)
autocommit
- true if autocommit should be usedvoid setRunParams(String[] parameter)
parameter
- parameterString[] getRunParams()
void setRunType(IContext.RunType run)
run
- RunTypeIContext.RunType getRunType()
void setRepeatableRandom(boolean repeatable)
repeatable
- should it be repeatableboolean isRepeatableRandom()
default String getLogIndentation()
default String getLogBegin()
default String getLogEnd()
ISarWriter getSarWriter()
Copyright © 2021. All rights reserved.