本文整理了Java中backtype.storm.task.TopologyContext.setSubscribedState()
方法的一些代码示例,展示了TopologyContext.setSubscribedState()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TopologyContext.setSubscribedState()
方法的具体详情如下:
包路径:backtype.storm.task.TopologyContext
类名称:TopologyContext
方法名:setSubscribedState
[英]Synchronizes the default stream from the specified state spout component id with the provided ISubscribedState object.
The recommended usage of this method is as follows:
_myState = context.setSubscribedState(componentId, new MyState());
[中]将指定状态喷口组件id中的默认流与提供的IsSubscribedState对象同步。
此方法的建议用法如下:
_myState=上下文。setSubscribedState(componentId,new MyState());
代码示例来源:origin: alibaba/jstorm
/**
* Synchronizes the default stream from the specified state spout component id with the provided ISubscribedState object.
*
* The recommended usage of this method is as follows:
* <pre>
* _myState = context.setSubscribedState(componentId, new MyState());
* </pre>
*
* @param componentId the id of the StateSpout component to subscribe to
* @param obj Provided ISubscribedState implementation
* @return Returns the ISubscribedState object provided
*/
public <T extends ISubscribedState> T setSubscribedState(String componentId, T obj) {
return setSubscribedState(componentId, Utils.DEFAULT_STREAM_ID, obj);
}
代码示例来源:origin: alibaba/mdrill
/**
* Synchronizes the default stream from the specified state spout component
* id with the provided ISubscribedState object.
*
* <p>The recommended usage of this method is as follows:</p>
* <p>
* _myState = context.setSubscribedState(componentId, new MyState());
* </p>
*
* @param componentId the id of the StateSpout component to subscribe to
* @param obj Provided ISubscribedState implementation
* @return Returns the ISubscribedState object provided
*/
public <T extends ISubscribedState> T setSubscribedState(String componentId, T obj) {
return setSubscribedState(componentId, Utils.DEFAULT_STREAM_ID, obj);
}
代码示例来源:origin: com.n3twork.storm/storm-core
/**
* Synchronizes the default stream from the specified state spout component
* id with the provided ISubscribedState object.
*
* <p>The recommended usage of this method is as follows:</p>
* <p>
* _myState = context.setSubscribedState(componentId, new MyState());
* </p>
*
* @param componentId the id of the StateSpout component to subscribe to
* @param obj Provided ISubscribedState implementation
* @return Returns the ISubscribedState object provided
*/
public <T extends ISubscribedState> T setSubscribedState(String componentId, T obj) {
return setSubscribedState(componentId, Utils.DEFAULT_STREAM_ID, obj);
}
代码示例来源:origin: com.alibaba.jstorm/jstorm-core
/**
* Synchronizes the default stream from the specified state spout component id with the provided ISubscribedState object.
*
* <p>
* The recommended usage of this method is as follows:
* </p>
* <p>
* _myState = context.setSubscribedState(componentId, new MyState());
* </p>
*
* @param componentId the id of the StateSpout component to subscribe to
* @param obj Provided ISubscribedState implementation
* @return Returns the ISubscribedState object provided
*/
public <T extends ISubscribedState> T setSubscribedState(String componentId, T obj) {
return setSubscribedState(componentId, Utils.DEFAULT_STREAM_ID, obj);
}
内容来源于网络,如有侵权,请联系作者删除!