zoukankan      html  css  js  c++  java
  • 并发控制 executes

    一、控制服务端并发

    限制 com.foo.BarService 的每个方法,服务器端并发执行(或占用线程池线程数)不能超过 10 个:

    <dubbo:service interface="com.foo.BarService" executes="10" />

    二、控制服务端并发(方法级别)

    限制 com.foo.BarService 的 sayHello 方法,服务器端并发执行(或占用线程池线程数)不能超过 10 个:

    <dubbo:service interface="com.foo.BarService">
        <dubbo:method name="sayHello" executes="10" />
    </dubbo:service>

    三、控制客户端并发

    限制 com.foo.BarService 的每个方法,每客户端并发执行(或占用连接的请求数)不能超过 10 个:

    <dubbo:service interface="com.foo.BarService" actives="10" />

    <dubbo:reference interface="com.foo.BarService" actives="10" />

    四、控制客户端并发(方法级别)

    限制 com.foo.BarService 的 sayHello 方法,每客户端并发执行(或占用连接的请求数)不能超过 10 个:

    <dubbo:service interface="com.foo.BarService">
        <dubbo:method name="sayHello" actives="10" />
    </dubbo:service>

    <dubbo:reference interface="com.foo.BarService">
        <dubbo:method name="sayHello" actives="10" />
    </dubbo:service>

    如果 <dubbo:service> 和 <dubbo:reference> 都配了actives,<dubbo:reference> 优先

  • 相关阅读:
    C#如何连接wifi和指定IP
    3.4 小结
    3.3.4.5 起始与清除
    3.3.4.4 打印行
    3.3.4.3 设置字段分隔字符
    3.3.4.2 字段
    3.3.4.1 模式与操作
    3.3.4 使用 awk 重新编排字段
    3.3.3 使用 join 连接字段
    3.3.2 使用 cut 选定字段
  • 原文地址:https://www.cnblogs.com/yifanSJ/p/9196719.html
Copyright © 2011-2022 走看看