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

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.

主站蜘蛛池模板: 乡城县| 鄂伦春自治旗| 灵璧县| 泰安市| 北安市| 将乐县| 尚义县| 华宁县| 咸丰县| 溆浦县| 望奎县| 丹棱县| 辽阳市| 平谷区| 绥滨县| 武威市| 滨州市| 定西市| 渝中区| 岢岚县| 阳春市| 洛隆县| 合作市| 兴安县| 衡南县| 平山县| 海门市| 当雄县| 休宁县| 太湖县| 三江| 邯郸县| 江阴市| 旬阳县| 彰武县| 徐水县| 新巴尔虎右旗| 兴海县| 中牟县| 中山市| 阿鲁科尔沁旗|