首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Java > java并行库

java并行库

  • 资源大小:18.74 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: java 并行

资 源 简 介

What is ParaJ ParaJ is set of parallel algorithms simplifying creation of multi-threaded programs. Example usage of Feed Engine ``` public void convert(InputStream in, OutputStream out) { CsvReader reader = initializeReader(in); FeedEngine engine = new FeedEngine(); engine.setMaxErrorCount(10); engine.addProducer(new CsvRecordReader(reader)); engine.addConsumer(new Transformer()); engine.addConsumer(new Transformer()); engine.addConsumer(new Transformer()); engine.runUntilAllProcessed(); logErrors(engine.getErrors()); writeToOutputStream(out, records); } ``` CvsRecordReader ``` private static class CsvRecordReader implements Producer { private final CsvReader reader; public CsvRecordReader(CsvReader reader) { this.reader = reader; } public String[] produce() throws Exception { if (!reader.readRecord()

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP