public class TaskType extends Object
| Constructor and Description |
|---|
TaskType() |
| Modifier and Type | Method and Description |
|---|---|
Task |
createTask(String target,
String source,
int interval,
int window)
A factory method for creating tasks of this type.
|
boolean |
equals(Object o) |
Supplier<Consumer<Task>> |
getFactory()
A function that produces functions that carry out task execution.
|
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 |
hashCode() |
TaskType |
setFactory(Supplier<Consumer<Task>> factory) |
TaskType |
setName(String name) |
TaskType |
setSegmentOffsets(int segmentOffsets) |
TaskType |
setSegments(int segments) |
public String getName()
public Supplier<Consumer<Task>> getFactory()
public int getSegments()
task.target.hashCode() % segmentspublic TaskType setSegments(int segments)
public int getSegmentOffsets()
public TaskType setSegmentOffsets(int segmentOffsets)
public Task createTask(String target, String source, int interval, int window)
target - Identifier or key of the entity or time series associated with the tasksource - Identifiers or keys of the time series that provide input data for the taskinterval - Specifies the frequency of execution in minuteswindow - Specifies the amount of data to include in minutesTaskCopyright © 2014–2015 Red Hat, Inc.. All rights reserved.