| Constructor and Description |
|---|
Task2Impl(UUID id,
String groupKey,
int order,
String name,
Map<String,String> parameters,
Trigger trigger) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getGroupKey()
The group key provides a way to logically and physically group tasks.
|
UUID |
getId()
This is essentially a primary key that uniquely identifies a task.
|
String |
getName()
Identifies the type of task.
|
int |
getOrder()
Defines the order of execution of tasks within a group.
|
Map<String,String> |
getParameters()
An optional, arbitrary set of key/value parameters that the task receives upon execution.
|
Trigger |
getTrigger()
Defines the execution policy of the task, like when the task is scheduled to execute, how many times it should
execute, etc.
|
int |
hashCode() |
String |
toString() |
public UUID getId()
Task2public String getGroupKey()
Task2
The group key provides a way to logically and physically group tasks. In conjunction with the
priority it can be used to control the order of execution of tasks which is desirable
when there are interdependencies between tasks. For example, suppose we have a task, T1, that aggregates data
from multiple time series to produce a new time series. Then we have a task, T2, that aggregates the data from
the time series produced by T2. T2 in effect depends on T1. They should use the same group key.
For Hawkular the group key will generally be the tenant ID. It is a good choice because tenants and all of their data are isolated from one another.
In terms of implementation, all tasks with the same group key will be stored in the same queue shard, which means that they will all be stored within the same physical partition. This should be taken into consideration when choosing a group key because you do not want to wind up with queue shards/partitions that are excessively large.
getGroupKey in interface Task2public int getOrder()
Task2group key.public String getName()
Task2public Map<String,String> getParameters()
Task2getParameters in interface Task2public Trigger getTrigger()
Task2getTrigger in interface Task2Copyright © 2014–2015 Red Hat, Inc.. All rights reserved.