标签:
学习了Akka第一个案例动手实战开发消息实体类,应用mapdata对单词级数,应用reduce对计数进行汇总,通过akka进行相互的消息通信。
代码案例如下:
package akka.dt.app.messages;
import java.util.List
public class MapData{
privatie List<WordCount> dataList;
public List<WordCount> getDataList() {return dataList;}
public MapData(List<WordCount> dataList) {this.dataList=dataList;}
}
package akka.dt.app.java.message;
import ava.util.HashMap;
public class ReduceData {
private HashMap<String,Integer> reduceDataList;
Public Hashmap<String,Integer> getReduceDataList() { return reduceDataList;}
Public ReduceData(HashMap<string, Integer> reduceDataList)
{ this.reduceDataList= reduceDataList}
}
标签:
原文地址:http://www.cnblogs.com/tom-lee/p/4785029.html