首页 > 代码库 > TridentState分析

TridentState分析

public class TridentState {    TridentTopology _topology;    Node _node;        protected TridentState(TridentTopology topology, Node node) {        _topology = topology;        _node = node;    }        public Stream newValuesStream() {        return new Stream(_topology, _node.name, _node);    }        public TridentState parallelismHint(int parallelism) {        _node.parallelismHint = parallelism;        return this;    }}

 主要作用就是构建 TridentTopology 和node相关联的Stream

TridentState分析