public class TaskType extends Object
| Constructor and Description |
|---|
TaskType() |
| Modifier and Type | Method and Description |
|---|---|
Task |
createTask(String tenantId,
String target,
String source)
A factory method for creating tasks of this type.
|
Task |
createTask(String tenantId,
String target,
String source,
int interval,
int window)
A factory method for creating tasks of this type.
|
boolean |
equals(Object o) |
int |
getInterval()
The default frequency of execution for tasks of this type.
|
String |
getName()
The task type name which must be unique among task types.
|
int |
getSegmentOffsets()
Tasks are associated with leases.
|
int |
getSegments()
The number of partitions in the database to use for storing tasks.
|
int |
getWindow()
The default amount of data to include for tasks of this type, expressed as a duration.
|
int |
hashCode() |
TaskType |
setInterval(int interval) |
TaskType |
setName(String name) |
TaskType |
setSegmentOffsets(int segmentOffsets) |
TaskType |
setSegments(int segments) |
TaskType |
setWindow(int window) |
public String getName()
public int getSegments()
task.target.hashCode() % segmentspublic TaskType setSegments(int segments)
public int getSegmentOffsets()
public TaskType setSegmentOffsets(int segmentOffsets)
public int getInterval()
TaskServiceBuilder.withTimeUnit(TimeUnit).public TaskType setInterval(int interval)
public int getWindow()
TaskServiceBuilder.withTimeUnit(TimeUnit).public TaskType setWindow(int window)
public Task createTask(String tenantId, String target, String source)
target - Identifier or key of the time series associated with the tasksource - Identifier or key of the time series that provides input data for the taskTaskpublic Task createTask(String tenantId, String target, String source, int interval, int window)
interval and
window is configured globally with TaskServiceBuilder.withTimeUnit(TimeUnit).target - Identifier or key of the time series associated with the tasksource - Identifier or key of the time series that provides input data for the taskinterval - Specifies the frequency of executionwindow - Specifies the amount of data to include, expressed as a durationTaskCopyright © 2014–2015 Red Hat, Inc.. All rights reserved.