Package org.voltdb.task
Interface TaskHelper
public interface TaskHelper
Helper interface passed to 
IntervalGenerator, ActionGenerator and ActionScheduler instances for
 calling in to the volt system to perform logging, validation and other operations- 
Method SummaryModifier and TypeMethodDescriptionintReturns the ID of the scope when this helper is passed to aninstantiatemethod otherwise-1booleanbooleanisProcedureReadOnly(String procedureName) Test if a procedure is read only.voidLog a message in the system log at the debug log levelvoidLog a message and throwable in the system log at the debug log levelvoidLog a message in the system log at the error log levelvoidLog a message and throwable in the system log at the error log levelvoidLog a message in the system log at the info log levelvoidLog a message and throwable in the system log at the info log levelvoidlogWarning(String message) Log a message in the system log at the warning log levelvoidlogWarning(String message, Throwable throwable) Log a message and throwable in the system log at the warning log levelvoidvalidateProcedure(CompoundErrors errors, boolean restrictProcedureByScope, String procedureName, Object[] parameters) Validate that a procedure withnameexists andparametersare valid for that procedure.
- 
Method Details- 
getTaskNameString getTaskName()- Returns:
- The name of the task
 
- 
getTaskScopeTaskScope getTaskScope()- Returns:
- The scope in which the task will be executing
 
- 
getScopeIdint getScopeId()Returns the ID of the scope when this helper is passed to aninstantiatemethod otherwise-1If scopeisTaskScope.PARTITIONSidwill be a partition ID. IfscopeisTaskScope.HOSTSidwill be a host ID. Otherwiseidwill be-1- Returns:
- The ID of the scope
 
- 
isDebugLoggingEnabledboolean isDebugLoggingEnabled()- Returns:
- trueif debug logging is enabled
 
- 
logDebugLog a message in the system log at the debug log level- Parameters:
- message- to log
 
- 
logDebugLog a message and throwable in the system log at the debug log level- Parameters:
- message- to log
- throwable- to log along with- message
 
- 
logInfoLog a message in the system log at the info log level- Parameters:
- message- to log
 
- 
logInfoLog a message and throwable in the system log at the info log level- Parameters:
- message- to log
- throwable- to log along with- message
 
- 
logWarningLog a message in the system log at the warning log level- Parameters:
- message- to log
 
- 
logWarningLog a message and throwable in the system log at the warning log level- Parameters:
- message- to log
- throwable- to log along with- message
 
- 
logErrorLog a message in the system log at the error log level- Parameters:
- message- to log
 
- 
logErrorLog a message and throwable in the system log at the error log level- Parameters:
- message- to log
- throwable- to log along with- message
 
- 
validateProcedurevoid validateProcedure(CompoundErrors errors, boolean restrictProcedureByScope, String procedureName, Object[] parameters) Validate that a procedure withnameexists andparametersare valid for that procedure.Note: parameter validation might not work for system procedures - Parameters:
- errors-- CompoundErrorsinstance to collect errors
- restrictProcedureByScope- If true type of procedures will be restricted. See- ActionGeneratorBase.restrictProcedureByScope()
- procedureName- Name of procedure to validate
- parameters- that will be passed to- name
 
- 
isProcedureReadOnlyTest if a procedure is read only. If a procedure cannot be found withprocedureNamethenfalseis returned- Parameters:
- procedureName- Name of procedure.
- Returns:
- trueif- procedureNameis read only
 
 
-