Interface Initializable

All Known Subinterfaces:
ActionGenerator, org.voltdb.task.ActionGeneratorBase, ActionScheduler, IntervalGenerator

public interface Initializable
Base interface for all interfaces of classes which are supplied to the TaskManager for construction and initialization

An initializable instance can have external parameters supplied by the DDL. If an initializable needs to have parameters passed in it is done through a public void initialize method. Only valid column types are allowed as initialize parameters with two exceptions. The first one being that the first argument may be an instance of TaskHelper, but this is optional. The other exception is that the last parameter can be either String[] or Object[]. If the last parameter is an array then it will be treated as a var args parameter.

Example initialize methods:

 public void initialize(int interval, String timeUnit)
 public void initialize(TaskHelper helper, int interval, String timeUnit)
 public void initialize(int interval, String timeUnit, String procedureName, Object... procedureParameters)
 public void initialize(TaskHelper helper, int interval, String timeUnit, String procedureName, Object... procedureParameters)
 

Optionally an implementation can implement a validateParameters method which will be invoked during the DDL validation phase. All parameters must match exactly the type of parameters passed to the initialize method of the Scheduler implementation. The return of validateParameters must be a String which is null if no error is detected otherwise an appropriate error message should be returned.

  • Method Summary

    Modifier and Type
    Method
    Description
    If this method is implemented then the task will only be restarted when it or any classes marked as a dependency are modified.
  • Method Details

    • getDependencies

      default Collection<String> getDependencies()
      If this method is implemented then the task will only be restarted when it or any classes marked as a dependency are modified. However if this method is not implemented then the task instance will be restarted any time any class is modified.

      Default return is null

      Returns:
      Collection of classesNames which this instance depends upon.