{"id":17722519,"url":"https://github.com/nepxion/coroutine","last_synced_at":"2025-10-04T06:44:29.379Z","repository":{"id":109497571,"uuid":"66636887","full_name":"Nepxion/Coroutine","owner":"Nepxion","description":"🔱 Nepxion Coroutine is a coroutine-driven distribution framework based on Kilim + Promise JDeferred + Zookeeper + Spring Boot, support Nepxion Thunder, Dubbo, Motan 基于规则配置的集成RPC调用的协程分布式调用的聚合框架","archived":false,"fork":false,"pushed_at":"2024-08-11T10:53:13.000Z","size":4946,"stargazers_count":42,"open_issues_count":0,"forks_count":23,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-09T02:56:35.481Z","etag":null,"topics":["coroutine","dubbo","jdeferred","kilim","promise","thunder","zookeeper"],"latest_commit_sha":null,"homepage":"http://www.nepxion.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nepxion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-26T09:49:33.000Z","updated_at":"2025-01-16T01:21:44.000Z","dependencies_parsed_at":"2024-01-08T13:00:30.867Z","dependency_job_id":"25b14fa8-f754-41fb-89fe-e0b4daad7015","html_url":"https://github.com/Nepxion/Coroutine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Nepxion/Coroutine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nepxion%2FCoroutine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nepxion%2FCoroutine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nepxion%2FCoroutine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nepxion%2FCoroutine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nepxion","download_url":"https://codeload.github.com/Nepxion/Coroutine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nepxion%2FCoroutine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278277880,"owners_count":25960430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coroutine","dubbo","jdeferred","kilim","promise","thunder","zookeeper"],"created_at":"2024-10-25T15:38:33.937Z","updated_at":"2025-10-04T06:44:29.343Z","avatar_url":"https://github.com/Nepxion.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nepxion Coroutine\n![Total visits](https://visitor-badge.laobi.icu/badge?page_id=Nepxion\u0026title=total%20visits)  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?label=license)](https://github.com/Nepxion/Coroutine/blob/master/LICENSE)  [![Build Status](https://github.com/Nepxion/Coroutine/workflows/build/badge.svg)](https://github.com/Nepxion/Coroutine/actions)  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/65e5f007b0d74caea2423508101724f5)](https://www.codacy.com/gh/Nepxion/Coroutine/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=Nepxion/Coroutine\u0026amp;utm_campaign=Badge_Grade)  [![Stars](https://img.shields.io/github/stars/Nepxion/Coroutine.svg?label=Stars\u0026style=flat\u0026logo=GitHub)](https://github.com/Nepxion/Coroutine/stargazers)  [![Stars](https://gitee.com/Nepxion/Coroutine/badge/star.svg)](https://gitee.com/Nepxion/Coroutine/stargazers)\n\n\u003ca href=\"https://github.com/Nepxion\" tppabs=\"#\" target=\"_blank\"\u003e\u003cimg width=\"25\" height=\"25\" src=\"https://nepxion.github.io/Discovery/docs/icon-doc/github.png\"\u003e\u003c/a\u003e\u0026nbsp;  \u003ca href=\"https://gitee.com/Nepxion\" tppabs=\"#\" target=\"_blank\"\u003e\u003cimg width=\"25\" height=\"25\" src=\"https://nepxion.github.io/Discovery/docs/icon-doc/gitee.png\"\u003e\u003c/a\u003e\u0026nbsp;  \u003ca href=\"https://search.maven.org/search?q=g:com.nepxion\" tppabs=\"#\" target=\"_blank\"\u003e\u003cimg width=\"25\" height=\"25\" src=\"https://nepxion.github.io/Discovery/docs/icon-doc/maven.png\"\u003e\u003c/a\u003e\u0026nbsp;  \u003ca href=\"https://nepxion.github.io/Discovery/docs/contact-doc/wechat.jpg\" tppabs=\"#\" target=\"_blank\"\u003e\u003cimg width=\"25\" height=\"25\" src=\"https://nepxion.github.io/Discovery/docs/icon-doc/wechat.png\"\u003e\u003c/a\u003e\u0026nbsp;  \u003ca href=\"https://nepxion.github.io/Discovery/docs/contact-doc/dingding.jpg\" tppabs=\"#\" target=\"_blank\"\u003e\u003cimg width=\"25\" height=\"25\" src=\"https://nepxion.github.io/Discovery/docs/icon-doc/dingding.png\"\u003e\u003c/a\u003e\u0026nbsp;  \u003ca href=\"https://nepxion.github.io/Discovery/docs/contact-doc/gongzhonghao.jpg\" tppabs=\"#\" target=\"_blank\"\u003e\u003cimg width=\"25\" height=\"25\" src=\"https://nepxion.github.io/Discovery/docs/icon-doc/gongzhonghao.png\"\u003e\u003c/a\u003e\u0026nbsp;  \u003ca href=\"mailto:1394997@qq.com\" tppabs=\"#\"\u003e\u003cimg width=\"25\" height=\"25\" src=\"https://nepxion.github.io/Discovery/docs/icon-doc/email.png\"\u003e\u003c/a\u003e\n\nNepxion Coroutine是一款基于Kilim + Promise JDeferred + Zookeeper + Spring Boot的协程分布式调用的聚合框架，提供聚合规则存储和动态变更通知\n\n## 介绍\n- 基于微服务框架理念设计\n- 支持同步/异步调用\n- 支持串行/并行调用\n- 支持本地/分布式(包括Thunder，Dubbo，Motan等)/混合链式调用\n- 支持嵌套规则/子规则调用\n- 支持本地/分布式规则引用\n- 支持调用链追踪\n- 异常捕获后智能处理链式调用的终止\n\n## 架构\n协程工作场景图\n\n![](https://nepxion.github.io/Discovery/docs/coroutine-doc/Coroutine1.jpg)\n\nCoroutine架构图\n\n![](https://nepxion.github.io/Discovery/docs/coroutine-doc/Coroutine2.jpg)\n\nCoroutine链式调用图\n\n![](https://nepxion.github.io/Discovery/docs/coroutine-doc/Coroutine3.jpg)\n\n## 规则\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003ccoroutine\u003e\n    \u003c!-- 规则定义 --\u003e\n    \u003c!-- 1. 规则目录即为注册中心的目录(category)节点名，规则名称即为存储当前规则内容的规则(rule)节点名；如果是本地规则，这两者可以随意定义。例如方法调用时，CoroutineManager.load().startSync(\"规则目录\", \"规则名称\"...) --\u003e\n    \u003c!-- 2. 协程(coroutine)节点下可以存在多个规则(rule)节点，以版本号(version)为区分，驱动过程采用最大版本号的规则，版本号必须全局唯一 --\u003e\n    \u003crule version=\"1\"\u003e\n        \u003c!-- 规则组件定义 --\u003e\n        \u003c!-- 规则组件支持本地引用和远程分布式(例如Dubbo接口)引用 --\u003e\n\n        \u003c!-- 1. 规则组件的本地引用方式，采用类反射机制 --\u003e\n        \u003c!--    class为类定义，class属性为类的全路径，例如class=\"com.nepxion.coroutine.test.service.impl.AServiceImpl\" --\u003e\n        \u003c!--    index为索引号，在当前规则下必须全局唯一 --\u003e\n        \u003c!--    method为方法定义，method属性为对应方法名 --\u003e\n        \u003c!--    parameterTypes为参数类型定义，如果一个接口/类下，存在多态的方法(即方法名相同，参数类型不一样)，必须以参数类型作为区分 --\u003e\n        \u003ccomponent\u003e\n            \u003cclass class=\"com.nepxion.coroutine.test.service.impl.AServiceImpl\"\u003e\n                \u003cmethod index=\"1\" method=\"doA\" parameterTypes=\"java.lang.String,int\"/\u003e\n                \u003cmethod index=\"2\" method=\"doA\" parameterTypes=\"java.lang.String\"/\u003e\n            \u003c/class\u003e\n            \u003cclass class=\"com.nepxion.coroutine.test.service.impl.BServiceImpl\"\u003e\n                \u003cmethod index=\"3\" method=\"doB\"/\u003e\n            \u003c/class\u003e\n        \u003c/component\u003e\n\n        \u003c!-- 2. 规则组件的远程分布式注入方式，采用接口注入机制方式 --\u003e\n        \u003c!--    applicationContext为标准的Spring xml路径配置方式，例如applicationContext=\"classpath*:cApplicationContext.xml\"，applicationContext.xml名称必须全局唯一 --\u003e\n        \u003c!--    id为Spring Bean的id，id必须全局唯一 --\u003e\n        \u003c!--    index为索引号，在当前规则下必须全局唯一 --\u003e\n        \u003c!--    method为方法定义，method属性为对应方法名 --\u003e\n        \u003c!--    parameterTypes为参数类型定义，如果一个接口/类下，存在多态的方法(即方法名相同，参数类型不一样)，必须以参数类型作为区分 --\u003e\n        \u003ccomponent applicationContext=\"classpath*:cApplicationContext.xml\"\u003e\n            \u003cclass id=\"cService\"\u003e\n                \u003cmethod index=\"4\" method=\"doC\"/\u003e\n            \u003c/class\u003e\n        \u003c/component\u003e\n        \u003ccomponent applicationContext=\"classpath*:dApplicationContext.xml\"\u003e\n            \u003cclass id=\"dService\"\u003e\n                \u003cmethod index=\"5\" method=\"doD\"/\u003e\n            \u003c/class\u003e\n        \u003c/component\u003e\n\n        \u003c!-- 子规则依赖定义，可以存在多个依赖(dependency)节点 --\u003e\n        \u003c!-- 1. 子规则不能当前父规则，否则会引起死循环。例如父规则A，引用子规则B，子规则B又引用父规则A --\u003e\n        \u003cdependency index=\"5\" category=\"A规则目录\" rule=\"A-1规则\" chain=\"a\" timeout=\"5000\"/\u003e\n        \u003cdependency index=\"6\" category=\"A规则目录\" rule=\"A-2规则\" chain=\"b\" timeout=\"5000\"/\u003e\n        \u003cdependency index=\"7\" category=\"B规则目录\" rule=\"B-1规则\" chain=\"c\" timeout=\"5000\"/\u003e\n        \u003cdependency index=\"8\" category=\"B规则目录\" rule=\"B-2规则\" chain=\"d\" timeout=\"5000\"/\u003e\n\n        \u003c!-- 链式调用定义 --\u003e\n        \u003c!-- 可定义多个chain。调用端需要把name值传入，如果配置里name不配，则传入null即可 --\u003e\n        \u003c!-- 1. 并行(when)的索引(index)值列表，不需要区分次序 --\u003e\n        \u003c!-- 2. 串行(then)的索引(index)值列表，需要区分次序 --\u003e\n        \u003cchain name=\"x\"\u003e\n            \u003cthen index=\"1,2\"/\u003e\n            \u003cwhen index=\"3,4\"/\u003e\n            \u003cthen index=\"5,6,7,8\"/\u003e\n        \u003c/chain\u003e\n\n        \u003cchain name=\"y\"\u003e\n            \u003cthen index=\"1,2\"/\u003e\n            \u003cwhen index=\"3,4\"/\u003e\n            \u003cthen index=\"5,6,7,8\"/\u003e\n        \u003c/chain\u003e\n    \u003c/rule\u003e\n\u003c/coroutine\u003e\n```\n\n## 示例\n异步调用\n```java\nCoroutineManager.load().startAsync(\"PayRoute\", \"Rule\", chainName, new String[] { \"入参\" }, false, new CoroutineCallback\u003cCoroutineResult\u003cObject\u003e\u003e() {\n    @Override\n    public void onResult(CoroutineResult\u003cObject\u003e result) {\n        LOG.info(\"异步回调结果: 线程序号={}, id={}, result={}\", index, result.getId(), result.getResult());\n    }\n\n    @Override\n    public void onError(Exception exception) {\n        LOG.error(\"异步回调异常\", exception);\n    }\n});\n```\n\n同步调用\n```java\ntry {\n    CoroutineResult\u003cObject\u003e result = CoroutineManager.load().startSync(\"PayRoute\", \"Rule\", chainName, new String[] { \"入参\" }, 3000, false);\n    LOG.info(\"同步调用结果: 线程序号={}, id={}, result={}\", index, result.getId(), result.getResult());\n} catch (Exception e) {\n    LOG.error(\"同步调用异常\", e);\n}\n```\n\n### 本地调用方式\n参照coroutine-test工程\n\n定义规则1\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003ccoroutine\u003e\n    \u003crule version=\"1\"\u003e\n        \u003ccomponent\u003e\n            \u003cclass class=\"com.nepxion.coroutine.test.service.impl.AServiceImpl\"\u003e\n                \u003cmethod index=\"1\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"2\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"3\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n            \u003cclass class=\"com.nepxion.coroutine.test.service.impl.BServiceImpl\"\u003e\n                \u003cmethod index=\"4\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"5\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"6\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n            \u003cclass class=\"com.nepxion.coroutine.test.service.impl.CServiceImpl\"\u003e\n                \u003cmethod index=\"7\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"8\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"9\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n            \u003cclass class=\"com.nepxion.coroutine.test.service.impl.DServiceImpl\"\u003e\n                \u003cmethod index=\"10\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"11\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"12\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n        \u003c/component\u003e\n\n        \u003cdependency index=\"13\" category=\"PayRoute\" rule=\"SubRule\" chain=\"chain2-2\" file=\"rule2.xml\" timeout=\"5000\"/\u003e\n\n        \u003cchain name=\"chain1-1\"\u003e\n            \u003cthen index=\"1,4\"/\u003e\n            \u003cwhen index=\"8,11\"/\u003e\n            \u003cthen index=\"12,1,13\"/\u003e\n        \u003c/chain\u003e\n\n        \u003cchain name=\"chain1-2\"\u003e\n            \u003cthen index=\"1,4\"/\u003e\n            \u003cwhen index=\"8,11\"/\u003e\n            \u003cthen index=\"12,1,13\"/\u003e\n        \u003c/chain\u003e\n    \u003c/rule\u003e\n\u003c/coroutine\u003e\n```\n\n定义规则2\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003ccoroutine\u003e\n    \u003crule version=\"1\"\u003e\n        \u003ccomponent\u003e\n            \u003cclass class=\"com.nepxion.coroutine.test.service.impl.AServiceImpl\"\u003e\n                \u003cmethod index=\"1\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"2\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"3\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n            \u003cclass class=\"com.nepxion.coroutine.test.service.impl.BServiceImpl\"\u003e\n                \u003cmethod index=\"4\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"5\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"6\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n            \u003cclass class=\"com.nepxion.coroutine.test.service.impl.CServiceImpl\"\u003e\n                \u003cmethod index=\"7\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"8\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"9\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n            \u003cclass class=\"com.nepxion.coroutine.test.service.impl.DServiceImpl\"\u003e\n                \u003cmethod index=\"10\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"11\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"12\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n        \u003c/component\u003e\n\n        \u003cchain name=\"chain2-1\"\u003e\n            \u003cwhen index=\"2,5\"/\u003e\n            \u003cthen index=\"9,10\"/\u003e\n            \u003cwhen index=\"8,11\"/\u003e\n            \u003cthen index=\"3,4\"/\u003e\n        \u003c/chain\u003e\n\n        \u003cchain name=\"chain2-2\"\u003e\n            \u003cthen index=\"1,4,7,10\"/\u003e\n        \u003c/chain\u003e\n    \u003c/rule\u003e\n\u003c/coroutine\u003e\n```\n\n调用入口\n```java\npackage com.nepxion.coroutine.test;\n\n/**\n * \u003cp\u003eTitle: Nepxion Coroutine\u003c/p\u003e\n * \u003cp\u003eDescription: Nepxion Coroutine For Distribution\u003c/p\u003e\n * \u003cp\u003eCopyright: Copyright (c) 2017\u003c/p\u003e\n * \u003cp\u003eCompany: Nepxion\u003c/p\u003e\n * @author Haojun Ren\n * @version 1.0\n */\n\nimport java.util.Timer;\nimport java.util.TimerTask;\n\nimport org.junit.Test;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\n\nimport com.nepxion.coroutine.common.callback.CoroutineCallback;\nimport com.nepxion.coroutine.data.entity.CoroutineResult;\nimport com.nepxion.coroutine.framework.core.CoroutineManager;\n\npublic class CoroutineTest {\n    private static final Logger LOG = LoggerFactory.getLogger(CoroutineTest.class);\n\n    @Test\n    public void testRemote() throws Exception {\n        // 请确保Zookeeper有对应的规则（运行CoroutineRuleRegistryTest相关方法）\n\n        // 从远程注册中心装载\n        // 启动和远程注册中心连接\n        CoroutineManager.start();\n\n        // 解析远端规则（支持子规则引用）\n        CoroutineManager.parseRemote(\"PayRoute\", \"Rule\");\n\n        // 链名称从xml配置中获取\n        invokeAsync(\"chain1-1\");\n        invokeSync(\"chain1-2\");\n\n        System.in.read();\n    }\n\n    @Test\n    public void testLocalRule1() throws Exception {\n        // 从本地装载\n        // 解析本地规则（不支持子规则引用）\n        CoroutineManager.parseLocal(\"PayRoute\", \"Rule\", \"rule1.xml\");\n\n        // 链名称从xml配置中获取\n        invokeAsync(\"chain1-1\");\n        invokeSync(\"chain1-2\");\n\n        System.in.read();\n    }\n\n    @Test\n    public void testLocalRule2() throws Exception {\n        // 从本地装载\n        // 解析本地规则（不支持子规则引用）\n        CoroutineManager.parseLocal(\"PayRoute\", \"Rule\", \"rule2.xml\");\n\n        // 链名称从xml配置中获取\n        invokeAsync(\"chain2-1\");\n        invokeSync(\"chain2-2\");\n\n        System.in.read();\n    }\n\n    public void invokeAsync(final String chainName) {\n        Timer timer = new Timer();\n        timer.scheduleAtFixedRate(new TimerTask() {\n            public void run() {\n                for (int i = 0; i \u003c 1; i++) {\n                    final int index = i % 5;\n                    CoroutineManager.load().startAsync(\"PayRoute\", \"Rule\", chainName, new String[] { \"Start[\" + index + \"]\" }, false, new CoroutineCallback\u003cCoroutineResult\u003cObject\u003e\u003e() {\n                        @Override\n                        public void onResult(CoroutineResult\u003cObject\u003e result) {\n                            LOG.info(\"异步回调结果: 线程序号={}, id={}, result={}\", index, result.getId(), result.getResult());\n                        }\n\n                        @Override\n                        public void onError(Exception exception) {\n                            LOG.error(\"异步回调异常\", exception);\n                        }\n                    });\n                }\n                LOG.info(\"------------------------------------------------------------\");\n            }\n        }, 0, 20000);\n    }\n\n    public void invokeSync(final String chainName) {\n        Timer timer = new Timer();\n        timer.scheduleAtFixedRate(new TimerTask() {\n            public void run() {\n                for (int i = 0; i \u003c 1; i++) {\n                    final int index = i % 5;\n\n                    try {\n                        CoroutineResult\u003cObject\u003e result = CoroutineManager.load().startSync(\"PayRoute\", \"Rule\", chainName, new String[] { \"Start[\" + index + \"]\" }, 3000, false);\n                        LOG.info(\"同步调用结果: 线程序号={}, id={}, result={}\", index, result.getId(), result.getResult());\n                    } catch (Exception e) {\n                        LOG.error(\"同步调用异常\", e);\n                    }\n                }\n                LOG.info(\"------------------------------------------------------------\");\n            }\n        }, 0, 20000);\n    }\n}\n```\n\n运行结果\n```\n2017-12-23 19:13:43.641 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.data.cache.CoroutineCache:39] - Daemon thread for scanning cache starts...\n2017-12-23 19:13:43.656 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=1, categoryName=PayRoute, ruleName=Rule, chainName=chain1-2, class=com.nepxion.coroutine.test.service.impl.AServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=3 ms, id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n2017-12-23 19:13:43.656 INFO [Coroutine-192.168.1.3-thread-0][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=1, categoryName=PayRoute, ruleName=Rule, chainName=chain1-1, class=com.nepxion.coroutine.test.service.impl.AServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=3 ms, id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n2017-12-23 19:13:43.660 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=4, categoryName=PayRoute, ruleName=Rule, chainName=chain1-2, class=com.nepxion.coroutine.test.service.impl.BServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n2017-12-23 19:13:43.660 INFO [Coroutine-192.168.1.3-thread-0][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=4, categoryName=PayRoute, ruleName=Rule, chainName=chain1-1, class=com.nepxion.coroutine.test.service.impl.BServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n2017-12-23 19:13:43.666 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.common.thread.ThreadPoolFactory:38] - Thread pool executor is created, threadName=Promise-192.168.1.3-thread, corePoolSize=64, maximumPoolSize=128, keepAliveTime=900000, allowCoreThreadTimeOut=false\n2017-12-23 19:13:43.669 INFO [Promise-192.168.1.3-thread-1][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=8, categoryName=PayRoute, ruleName=Rule, chainName=chain1-2, class=com.nepxion.coroutine.test.service.impl.CServiceImpl, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n2017-12-23 19:13:43.669 INFO [Promise-192.168.1.3-thread-2][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=11, categoryName=PayRoute, ruleName=Rule, chainName=chain1-2, class=com.nepxion.coroutine.test.service.impl.DServiceImpl, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n2017-12-23 19:13:43.669 INFO [Promise-192.168.1.3-thread-3][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=11, categoryName=PayRoute, ruleName=Rule, chainName=chain1-1, class=com.nepxion.coroutine.test.service.impl.DServiceImpl, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n2017-12-23 19:13:43.669 INFO [Promise-192.168.1.3-thread-0][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=8, categoryName=PayRoute, ruleName=Rule, chainName=chain1-1, class=com.nepxion.coroutine.test.service.impl.CServiceImpl, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n2017-12-23 19:13:43.675 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=12, categoryName=PayRoute, ruleName=Rule, chainName=chain1-2, class=com.nepxion.coroutine.test.service.impl.DServiceImpl, method=doMerge, parameterTypes=com.nepxion.coroutine.data.entity.CoroutineList, returnType=java.lang.String, spentTime=0 ms, id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n2017-12-23 19:13:43.675 INFO [Coroutine-192.168.1.3-thread-0][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=12, categoryName=PayRoute, ruleName=Rule, chainName=chain1-1, class=com.nepxion.coroutine.test.service.impl.DServiceImpl, method=doMerge, parameterTypes=com.nepxion.coroutine.data.entity.CoroutineList, returnType=java.lang.String, spentTime=0 ms, id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n2017-12-23 19:13:43.675 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=1, categoryName=PayRoute, ruleName=Rule, chainName=chain1-2, class=com.nepxion.coroutine.test.service.impl.AServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n2017-12-23 19:13:43.675 INFO [Coroutine-192.168.1.3-thread-0][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=1, categoryName=PayRoute, ruleName=Rule, chainName=chain1-1, class=com.nepxion.coroutine.test.service.impl.AServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n2017-12-23 19:13:43.677 INFO [Coroutine-192.168.1.3-thread-2][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=1, categoryName=PayRoute, ruleName=SubRule, chainName=chain2-2, class=com.nepxion.coroutine.test.service.impl.AServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n2017-12-23 19:13:43.677 INFO [Coroutine-192.168.1.3-thread-3][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=1, categoryName=PayRoute, ruleName=SubRule, chainName=chain2-2, class=com.nepxion.coroutine.test.service.impl.AServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n2017-12-23 19:13:43.678 INFO [Coroutine-192.168.1.3-thread-2][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=4, categoryName=PayRoute, ruleName=SubRule, chainName=chain2-2, class=com.nepxion.coroutine.test.service.impl.BServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n2017-12-23 19:13:43.678 INFO [Coroutine-192.168.1.3-thread-3][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=4, categoryName=PayRoute, ruleName=SubRule, chainName=chain2-2, class=com.nepxion.coroutine.test.service.impl.BServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n2017-12-23 19:13:43.678 INFO [Coroutine-192.168.1.3-thread-2][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=7, categoryName=PayRoute, ruleName=SubRule, chainName=chain2-2, class=com.nepxion.coroutine.test.service.impl.CServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n2017-12-23 19:13:43.678 INFO [Coroutine-192.168.1.3-thread-3][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=7, categoryName=PayRoute, ruleName=SubRule, chainName=chain2-2, class=com.nepxion.coroutine.test.service.impl.CServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=0 ms, id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n2017-12-23 19:13:43.679 INFO [Coroutine-192.168.1.3-thread-3][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=10, categoryName=PayRoute, ruleName=SubRule, chainName=chain2-2, class=com.nepxion.coroutine.test.service.impl.DServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=1 ms, id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n2017-12-23 19:13:43.679 INFO [Coroutine-192.168.1.3-thread-2][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=10, categoryName=PayRoute, ruleName=SubRule, chainName=chain2-2, class=com.nepxion.coroutine.test.service.impl.DServiceImpl, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=1 ms, id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n2017-12-23 19:13:43.680 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:61] - Serial completed, referenceType=dependencyReference, index=13, categoryName=PayRoute, ruleName=SubRule, chainName=chain1-2, returnType=com.nepxion.coroutine.data.entity.CoroutineResult, spentTime=4 ms, id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n2017-12-23 19:13:43.680 INFO [Coroutine-192.168.1.3-thread-0][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:61] - Serial completed, referenceType=dependencyReference, index=13, categoryName=PayRoute, ruleName=SubRule, chainName=chain1-1, returnType=com.nepxion.coroutine.data.entity.CoroutineResult, spentTime=4 ms, id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n2017-12-23 19:13:43.692 INFO [Coroutine-192.168.1.3-thread-0][com.nepxion.coroutine.test.CoroutineTest$1$1:80] - 异步回调结果: 线程序号=0, id=com.nepxion.coroutine.data.entity.CoroutineId@3ee322f7[\n  id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n  categoryName=PayRoute\n  ruleName=Rule\n], result=com.nepxion.coroutine.data.entity.CoroutineResult@719c38e3[\n  id=com.nepxion.coroutine.data.entity.CoroutineId@14874a4f[\n  id=98c84565-ca73-42b8-a2e8-da4dee6df22a\n  categoryName=PayRoute\n  ruleName=SubRule\n]\n  timestamp=0\n  result=(Start[0] -\u003e A[0] -\u003e B[0] -\u003e C[0] -\u003e D[0] , Start[0] -\u003e A[0] -\u003e B[0] -\u003e D[0] -\u003e D[0]) -\u003e A[0]) -\u003e A[0]) -\u003e B[0]) -\u003e C[0]) -\u003e D[0])\n  exception=\u003cnull\u003e\n]\n2017-12-23 19:13:43.692 INFO [Timer-1][com.nepxion.coroutine.test.CoroutineTest$2:103] - 同步调用结果: 线程序号=0, id=com.nepxion.coroutine.data.entity.CoroutineId@320ca662[\n  id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n  categoryName=PayRoute\n  ruleName=Rule\n], result=com.nepxion.coroutine.data.entity.CoroutineResult@475af95a[\n  id=com.nepxion.coroutine.data.entity.CoroutineId@3ce1ece3[\n  id=6fcb1456-fc34-49a0-9ad4-832fd5f3f375\n  categoryName=PayRoute\n  ruleName=SubRule\n]\n  timestamp=0\n  result=(Start[0] -\u003e A[0] -\u003e B[0] -\u003e C[0] -\u003e D[0] , Start[0] -\u003e A[0] -\u003e B[0] -\u003e D[0] -\u003e D[0]) -\u003e A[0]) -\u003e A[0]) -\u003e B[0]) -\u003e C[0]) -\u003e D[0])\n  exception=\u003cnull\u003e\n]\n```\n\n### 分布式调用方式\n基于Spring Boot在Dubbo和Thunder框架的协程调用，分布式API的聚合\n\n定义规则\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003ccoroutine\u003e\n    \u003crule version=\"1\"\u003e\n        \u003ccomponent applicationContext=\"classpath*:dubbo-client-context-coroutine.xml\"\u003e\n            \u003cclass id=\"aService\"\u003e\n                \u003cmethod index=\"1\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"2\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"3\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n            \u003cclass id=\"bService\"\u003e\n                \u003cmethod index=\"4\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"5\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"6\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n        \u003c/component\u003e\n        \u003ccomponent applicationContext=\"classpath*:thunder-client-context-coroutine.xml\"\u003e\n            \u003cclass id=\"cService\"\u003e\n                \u003cmethod index=\"7\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"8\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"9\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n            \u003cclass id=\"dService\"\u003e\n                \u003cmethod index=\"10\" method=\"doThen\"/\u003e\n                \u003cmethod index=\"11\" method=\"doWhen\"/\u003e\n                \u003cmethod index=\"12\" method=\"doMerge\"/\u003e\n            \u003c/class\u003e\n        \u003c/component\u003e\n\n        \u003cchain\u003e\n            \u003cwhen index=\"2,5\"/\u003e\n            \u003cthen index=\"9,10\"/\u003e\n            \u003cwhen index=\"8,11\"/\u003e\n            \u003cthen index=\"3,4\"/\u003e\n        \u003c/chain\u003e\n    \u003c/rule\u003e\n\u003c/coroutine\u003e\n```\n\n调用入口\n\n运行coroutine-spring-boot-dubbo-server-example下的DubboServerApplication.java\n\n运行coroutine-spring-boot-thunder-server-example下的ThunderServerApplication.java\n\n运行coroutine-spring-boot-client-example下的CoroutineClientApplication.java\n```java\npackage com.nepxion.coroutine;\n\n/**\n * \u003cp\u003eTitle: Nepxion Coroutine\u003c/p\u003e\n * \u003cp\u003eDescription: Nepxion Coroutine For Distribution\u003c/p\u003e\n * \u003cp\u003eCopyright: Copyright (c) 2017\u003c/p\u003e\n * \u003cp\u003eCompany: Nepxion\u003c/p\u003e\n * @author Haojun Ren\n * @version 1.0\n */\n\nimport java.util.Timer;\nimport java.util.TimerTask;\n\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;\nimport org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.ComponentScan;\n\nimport com.nepxion.coroutine.common.callback.CoroutineCallback;\nimport com.nepxion.coroutine.data.entity.CoroutineResult;\nimport com.nepxion.coroutine.framework.core.CoroutineManager;\n\n@SpringBootApplication\n@ComponentScan(basePackages = { \"com.nepxion.coroutine\" })\npublic class CoroutineClientApplication {\n    private static final Logger LOG = LoggerFactory.getLogger(CoroutineClientApplication.class);\n\n    public static void main(String[] args) throws Exception {\n        SpringApplication.run(CoroutineClientApplication.class, args);\n\n        // invokeRemote();\n        invokeLocal();\n    }\n\n    public static void invokeRemote() throws Exception {\n        // 请确保Zookeeper有对应的规则（运行CoroutineRuleRegistry相关方法）\n\n        // 从远程注册中心装载\n        // 启动和远程注册中心连接\n        CoroutineManager.start();\n\n        // 解析远端规则（支持子规则引用）\n        CoroutineManager.parseRemote(\"Distribution PayRoute\", \"Distribution Rule\");\n\n        invokeAsync();\n        invokeSync();\n    }\n\n    public static void invokeLocal() throws Exception {\n        // 从本地装载\n        // 解析本地规则（不支持子规则引用）\n        CoroutineManager.parseLocal(\"Distribution PayRoute\", \"Distribution Rule\", \"rule.xml\");\n\n        invokeAsync();\n        invokeSync();\n    }\n\n    public static void invokeAsync() {\n        Timer timer = new Timer();\n        timer.scheduleAtFixedRate(new TimerTask() {\n            public void run() {\n                for (int i = 0; i \u003c 1; i++) {\n                    final int index = i % 5;\n                    CoroutineManager.load().startAsync(\"Distribution PayRoute\", \"Distribution Rule\", null, new String[] { \"Start[\" + index + \"]\" }, false, new CoroutineCallback\u003cCoroutineResult\u003cObject\u003e\u003e() {\n                        @Override\n                        public void onResult(CoroutineResult\u003cObject\u003e result) {\n                            LOG.info(\"异步回调结果: 线程序号={}, id={}, result={}\", index, result.getId(), result.getResult());\n                        }\n\n                        @Override\n                        public void onError(Exception exception) {\n                            LOG.error(\"异步回调异常\", exception);\n                        }\n                    });\n                }\n                LOG.info(\"------------------------------------------------------------\");\n            }\n        }, 0, 20000);\n    }\n\n    public static void invokeSync() {\n        Timer timer = new Timer();\n        timer.scheduleAtFixedRate(new TimerTask() {\n            public void run() {\n                for (int i = 0; i \u003c 1; i++) {\n                    final int index = i % 5;\n\n                    try {\n                        CoroutineResult\u003cObject\u003e result = CoroutineManager.load().startSync(\"Distribution PayRoute\", \"Distribution Rule\", null, new String[] { \"Start[\" + index + \"]\" }, 3000, false);\n                        LOG.info(\"同步调用结果: 线程序号={}, id={}, result={}\", index, result.getId(), result.getResult());\n                    } catch (Exception e) {\n                        LOG.error(\"同步调用异常\", e);\n                    }\n                }\n                LOG.info(\"------------------------------------------------------------\");\n            }\n        }, 0, 20000);\n    }\n\n    @Bean\n    public EmbeddedServletContainerFactory createEmbeddedServletContainerFactory() {\n        TomcatEmbeddedServletContainerFactory tomcatFactory = new TomcatEmbeddedServletContainerFactory();\n        tomcatFactory.setPort(9081);\n\n        return tomcatFactory;\n    }\n}\n```\n\n运行结果\n```\n2017-12-23 19:20:28.905 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.common.thread.ThreadPoolFactory:38] - Thread pool executor is created, threadName=Promise-192.168.1.3-thread, corePoolSize=64, maximumPoolSize=128, keepAliveTime=900000, allowCoreThreadTimeOut=false\n2017-12-23 19:20:29.052 INFO [Promise-192.168.1.3-thread-2][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=5, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=bService, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=136 ms, id=956ab727-0e18-48aa-8334-1453c139fa23\n2017-12-23 19:20:29.052 INFO [Promise-192.168.1.3-thread-3][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=5, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=bService, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=136 ms, id=b22a77b6-0776-49a1-a6bb-e15268ffd0c1\n2017-12-23 19:20:29.052 INFO [Promise-192.168.1.3-thread-0][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=2, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=aService, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=136 ms, id=956ab727-0e18-48aa-8334-1453c139fa23\n2017-12-23 19:20:29.052 INFO [Promise-192.168.1.3-thread-1][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=2, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=aService, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=136 ms, id=b22a77b6-0776-49a1-a6bb-e15268ffd0c1\n2017-12-23 19:20:29.199 INFO [ClientAffinityThreadFactory][com.nepxion.thunder.common.thread.ThreadPoolFactory:106] - Thread pool executor is created, threadName=Thunder-reference-192.168.1.3:6010-thread, corePoolSize=32, maximumPoolSize=64, keepAliveTime=900000, allowCoreThreadTimeOut=false\n2017-12-23 19:20:29.200 INFO [Coroutine-192.168.1.3-thread-0][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=9, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=cService, method=doMerge, parameterTypes=java.util.List, returnType=java.lang.String, spentTime=143 ms, id=956ab727-0e18-48aa-8334-1453c139fa23\n2017-12-23 19:20:29.201 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=9, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=cService, method=doMerge, parameterTypes=java.util.List, returnType=java.lang.String, spentTime=143 ms, id=b22a77b6-0776-49a1-a6bb-e15268ffd0c1\n2017-12-23 19:20:29.206 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=10, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=dService, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=3 ms, id=b22a77b6-0776-49a1-a6bb-e15268ffd0c1\n2017-12-23 19:20:29.206 INFO [Coroutine-192.168.1.3-thread-0][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=10, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=dService, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=3 ms, id=956ab727-0e18-48aa-8334-1453c139fa23\n2017-12-23 19:20:29.213 INFO [Promise-192.168.1.3-thread-4][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=8, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=cService, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=5 ms, id=b22a77b6-0776-49a1-a6bb-e15268ffd0c1\n2017-12-23 19:20:29.214 INFO [Promise-192.168.1.3-thread-5][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=8, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=cService, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=6 ms, id=956ab727-0e18-48aa-8334-1453c139fa23\n2017-12-23 19:20:29.214 INFO [Promise-192.168.1.3-thread-7][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=11, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=dService, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=6 ms, id=b22a77b6-0776-49a1-a6bb-e15268ffd0c1\n2017-12-23 19:20:29.215 INFO [Promise-192.168.1.3-thread-6][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Parallel completed, referenceType=componentReference, index=11, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=dService, method=doWhen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=7 ms, id=956ab727-0e18-48aa-8334-1453c139fa23\n2017-12-23 19:20:29.220 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=3, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=aService, method=doMerge, parameterTypes=java.util.List, returnType=java.lang.String, spentTime=5 ms, id=b22a77b6-0776-49a1-a6bb-e15268ffd0c1\n2017-12-23 19:20:29.220 INFO [Coroutine-192.168.1.3-thread-0][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=3, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=aService, method=doMerge, parameterTypes=java.util.List, returnType=java.lang.String, spentTime=5 ms, id=956ab727-0e18-48aa-8334-1453c139fa23\n2017-12-23 19:20:29.222 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=4, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=bService, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=2 ms, id=b22a77b6-0776-49a1-a6bb-e15268ffd0c1\n2017-12-23 19:20:29.222 INFO [Coroutine-192.168.1.3-thread-0][com.nepxion.coroutine.monitor.log.LogMonitorLauncher:55] - Serial completed, referenceType=componentReference, index=4, categoryName=Distribution PayRoute, ruleName=Distribution Rule, chainName=null, classId=bService, method=doThen, parameterTypes=java.lang.String, returnType=java.lang.String, spentTime=2 ms, id=956ab727-0e18-48aa-8334-1453c139fa23\n2017-12-23 19:20:29.223 INFO [Timer-1][com.nepxion.coroutine.CoroutineClientApplication$2:96] - 同步调用结果: 线程序号=0, id=com.nepxion.coroutine.data.entity.CoroutineId@2295f70c[\n  id=956ab727-0e18-48aa-8334-1453c139fa23\n  categoryName=Distribution PayRoute\n  ruleName=Distribution Rule\n], result=((Start[0] -\u003e A[0] -\u003e C[0] , Start[0] -\u003e B[0] -\u003e C[0]) -\u003e D[0]) -\u003e C[0]) -\u003e A[0]) , (Start[0] -\u003e A[0] -\u003e C[0] , Start[0] -\u003e B[0] -\u003e C[0]) -\u003e D[0]) -\u003e D[0]) -\u003e A[0])) -\u003e B[0]))\n2017-12-23 19:20:29.223 INFO [Coroutine-192.168.1.3-thread-1][com.nepxion.coroutine.CoroutineClientApplication$1$1:73] - 异步回调结果: 线程序号=0, id=com.nepxion.coroutine.data.entity.CoroutineId@51baebd3[\n  id=b22a77b6-0776-49a1-a6bb-e15268ffd0c1\n  categoryName=Distribution PayRoute\n  ruleName=Distribution Rule\n], result=((Start[0] -\u003e A[0] -\u003e C[0] , Start[0] -\u003e B[0] -\u003e C[0]) -\u003e D[0]) -\u003e C[0]) -\u003e A[0]) , (Start[0] -\u003e A[0] -\u003e C[0] , Start[0] -\u003e B[0] -\u003e C[0]) -\u003e D[0]) -\u003e D[0]) -\u003e A[0])) -\u003e B[0]))\n```\n\n## 请联系我\n微信、钉钉、公众号和文档\n\n![](https://nepxion.github.io/Discovery/docs/contact-doc/wechat-1.jpg)![](https://nepxion.github.io/Discovery/docs/contact-doc/dingding-1.jpg)![](https://nepxion.github.io/Discovery/docs/contact-doc/gongzhonghao-1.jpg)![](https://nepxion.github.io/Discovery/docs/contact-doc/document-1.jpg)\n\n## Star走势图\n[![Stargazers over time](https://starchart.cc/Nepxion/Coroutine.svg)](https://starchart.cc/Nepxion/Coroutine)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnepxion%2Fcoroutine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnepxion%2Fcoroutine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnepxion%2Fcoroutine/lists"}