- Spring 5.0 Projects
- Nilang Patel
- 168字
- 2021-07-02 12:35:02
Subscription rules
The following interface describes the Subscription notation:
public interface Subscription {
public void request(long n);
public void cancel();
}
The rule number 3.2 says, Subscription must allow the Subscriber to call Subscription.request synchronously from within onNext or onSubscribe. It talks about preventing both Publisher and Subscriber by restricting posting of the message only when Publisher gets the signal for a further request from Subscriber. This happens in a synchronous manner to avoid a stack overflow.
In a similar context, another rule, number 3.3, states, Subscription.request() must place an upper bound on possible synchronous recursion between Publisher and Subscriber. It complements rule 3.2 in a sense by deciding an upper limit in the recursive interaction between Publisher and Subscriber in the form of the onNext() and request() call. Setting the upper limit will avoid blowing out when calling a thread stack. The rules starting from number 3.5 to 3.15 describe the behavior of cancelling and completing the request.
- 網(wǎng)絡(luò)故障現(xiàn)場(chǎng)處理實(shí)踐(第4版)
- JBoss EAP6 High Availability
- Metasploit Penetration Testing Cookbook
- VMware NSX網(wǎng)絡(luò)虛擬化入門(mén)
- 6G無(wú)線(xiàn)網(wǎng)絡(luò)空口關(guān)鍵技術(shù)
- 物聯(lián)網(wǎng)工程概論
- 網(wǎng)絡(luò)利他行為研究:積極心理學(xué)的視角
- 局域網(wǎng)組成實(shí)踐
- Implementing NetScaler VPX?
- 計(jì)算機(jī)網(wǎng)絡(luò)技術(shù)
- 全聯(lián)網(wǎng)標(biāo)識(shí)服務(wù)
- 物聯(lián)網(wǎng)M2M開(kāi)發(fā)技術(shù):基于無(wú)線(xiàn)CPU-Q26XX
- Corona SDK Application Design
- Microservices Development Cookbook
- 網(wǎng)絡(luò)信息安全工程技術(shù)與應(yīng)用分析