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

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.

主站蜘蛛池模板: 平利县| 西吉县| 西乌珠穆沁旗| 勐海县| 衡南县| 普兰县| 铁力市| 禹州市| 宣恩县| 永嘉县| 浦城县| 云霄县| 江都市| 池州市| 三门县| 高安市| 塔河县| 德州市| 望江县| 勃利县| 肇州县| 积石山| 北流市| 通许县| 锦屏县| 张家界市| 北流市| 方正县| 汤原县| 贵定县| 兰溪市| 盐山县| 济宁市| 建德市| 克东县| 高陵县| 连江县| 稻城县| 辽宁省| 土默特右旗| 宜川县|