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

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.

主站蜘蛛池模板: 赫章县| 广河县| 阳山县| 绥江县| 喜德县| 保康县| 东丰县| 留坝县| 蒙阴县| 晋州市| 奉节县| 新巴尔虎右旗| 景洪市| 百色市| 林甸县| 富平县| 闸北区| 黔江区| 唐山市| 牡丹江市| 鄂托克旗| 兴文县| 昔阳县| 永丰县| 大方县| 崇信县| 巴彦县| 黔东| 岱山县| 义马市| 吉首市| 彰化县| 青河县| 双江| 凤城市| 侯马市| 佛教| 习水县| 丹江口市| 梁河县| 桐庐县|