官术网_书友最值得收藏!

The @Bulkhead policy

The @Bulkhead annotation can also be applied to a class or method to enforce the bulkhead policy. This pattern isolates failures in the current operation to preserve the execution of other operations. The implementation does this by limiting the number of concurrent invocations on a given method:

@Bulkhead(4)
public void bulkheadedOperation() {
...
}

In the previous code, this method only supports four invocations at the same time. Should more than four simultaneous requests come into the bulkheadedOperation method, the system will hold the fifth and later requests until one of the four active invocations completes. The bulkhead annotation can also be used with @Asynchronous to limit the thread number in an asynchronous operation.

主站蜘蛛池模板: 阿坝| 会昌县| 大安市| 松桃| 靖安县| 凤冈县| 华安县| 措勤县| 宜君县| 肇州县| 丹东市| 吴江市| 民县| 蕉岭县| 浪卡子县| 噶尔县| 保亭| 平顺县| 丹东市| 托里县| 那曲县| 涪陵区| 饶平县| 内丘县| 玉溪市| 东兰县| 许昌县| 泰来县| 佳木斯市| 景宁| 大足县| 高碑店市| 玛曲县| 奉节县| 平乡县| 上饶县| 汉阴县| 宜阳县| 肃南| 阿拉善左旗| 永城市|