public interface TopologyContext extends GeneralTopologyContext, IMetricsRegister
Modifier and Type | Method and Description |
---|---|
void |
addTaskHook(ITaskHook hook)
Add a Task Hook for this instance
|
java.util.Collection<ITaskHook> |
getHooks()
Get the list of all task hooks
|
java.lang.Object |
getTaskData(java.lang.String name) |
java.lang.String |
getThisComponentId()
Gets the component id for this task.
|
Fields |
getThisOutputFields(java.lang.String streamId)
Gets the declared output fields for the specified stream id for the component
this task is a part of.
|
java.util.Map<TopologyAPI.StreamId,TopologyAPI.Grouping> |
getThisSources()
Gets the declared inputs to this component.
|
java.util.Set<java.lang.String> |
getThisStreams()
Gets the set of streams declared for the component of this task.
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,TopologyAPI.Grouping>> |
getThisTargets()
Gets information about who is consuming the outputs of this component, and how.
|
int |
getThisTaskId()
Gets the task id of this task.
|
int |
getThisTaskIndex()
Gets the index of this task id in getComponentTasks(getThisComponentId()).
|
CombinedMetric |
registerMetric(java.lang.String name,
ICombiner combiner,
int timeBucketSizeInSecs) |
ReducedMetric |
registerMetric(java.lang.String name,
IReducer reducer,
int timeBucketSizeInSecs) |
void |
setTaskData(java.lang.String name,
java.lang.Object data) |
getComponentId, getComponentIds, getComponentOutputFields, getComponentStreams, getComponentTasks, getSources, getTargets, getTaskToComponent, getTopologyId, maxTopologyMessageTimeout
registerMetric
int getThisTaskId()
java.lang.String getThisComponentId()
Fields getThisOutputFields(java.lang.String streamId)
java.util.Set<java.lang.String> getThisStreams()
int getThisTaskIndex()
java.util.Map<TopologyAPI.StreamId,TopologyAPI.Grouping> getThisSources()
java.util.Map<java.lang.String,java.util.Map<java.lang.String,TopologyAPI.Grouping>> getThisTargets()
void setTaskData(java.lang.String name, java.lang.Object data)
java.lang.Object getTaskData(java.lang.String name)
void addTaskHook(ITaskHook hook)
java.util.Collection<ITaskHook> getHooks()
ReducedMetric registerMetric(java.lang.String name, IReducer reducer, int timeBucketSizeInSecs)
CombinedMetric registerMetric(java.lang.String name, ICombiner combiner, int timeBucketSizeInSecs)