public interface TaskHelper
IntervalGenerator, ActionGenerator and ActionScheduler instances for
calling in to the volt system to perform logging, validation and other operations| Modifier and Type | Method and Description |
|---|---|
int |
getScopeId()
Returns the ID of the scope when this helper is passed to an
instantiate method otherwise -1 |
java.lang.String |
getTaskName() |
TaskScope |
getTaskScepe() |
boolean |
isDebugLoggingEnabled() |
boolean |
isProcedureReadOnly(java.lang.String procedureName)
Test if a procedure is read only.
|
void |
logDebug(java.lang.String message)
Log a message in the system log at the debug log level
|
void |
logDebug(java.lang.String message,
java.lang.Throwable throwable)
Log a message and throwable in the system log at the debug log level
|
void |
logError(java.lang.String message)
Log a message in the system log at the error log level
|
void |
logError(java.lang.String message,
java.lang.Throwable throwable)
Log a message and throwable in the system log at the error log level
|
void |
logInfo(java.lang.String message)
Log a message in the system log at the info log level
|
void |
logInfo(java.lang.String message,
java.lang.Throwable throwable)
Log a message and throwable in the system log at the info log level
|
void |
logWarning(java.lang.String message)
Log a message in the system log at the warning log level
|
void |
logWarning(java.lang.String message,
java.lang.Throwable throwable)
Log a message and throwable in the system log at the warning log level
|
void |
validateProcedure(CompoundErrors errors,
boolean restrictProcedureByScope,
java.lang.String procedureName,
java.lang.Object[] parameters)
Validate that a procedure with
name exists and parameters are valid for that procedure. |
java.lang.String getTaskName()
TaskScope getTaskScepe()
int getScopeId()
instantiate method otherwise -1
If scope is TaskScope.PARTITIONS id will be a partition ID. If scope is
TaskScope.HOSTS id will be a host ID. Otherwise id will be -1
boolean isDebugLoggingEnabled()
true if debug logging is enabledvoid logDebug(java.lang.String message)
message - to logvoid logDebug(java.lang.String message,
java.lang.Throwable throwable)
message - to logthrowable - to log along with messagevoid logInfo(java.lang.String message)
message - to logvoid logInfo(java.lang.String message,
java.lang.Throwable throwable)
message - to logthrowable - to log along with messagevoid logWarning(java.lang.String message)
message - to logvoid logWarning(java.lang.String message,
java.lang.Throwable throwable)
message - to logthrowable - to log along with messagevoid logError(java.lang.String message)
message - to logvoid logError(java.lang.String message,
java.lang.Throwable throwable)
message - to logthrowable - to log along with messagevoid validateProcedure(CompoundErrors errors, boolean restrictProcedureByScope, java.lang.String procedureName, java.lang.Object[] parameters)
name exists and parameters are valid for that procedure.
Note: parameter validation might not work for system procedures
errors - CompoundErrors instance to collect errorsrestrictProcedureByScope - If true type of procedures will be restricted. See
ActionGeneratorBase.restrictProcedureByScope()procedureName - Name of procedure to validateparameters - that will be passed to nameboolean isProcedureReadOnly(java.lang.String procedureName)
procedureName then false is
returnedprocedureName - Name of procedure.true if procedureName is read only