public static class SlidingWindow.Client<REQUEST extends SlidingWindow.ClientSideRequest<REPLY>,REPLY> extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
void |
fail(long startingSeqNum,
Throwable e)
Fail all requests starting from the given seqNum.
|
boolean |
isFirst(long seqNum) |
void |
receiveReply(long seqNum,
REPLY reply,
Consumer<REQUEST> sendMethod)
Receive a reply with the given seqNum (may out-of-order).
|
void |
resetFirstSeqNum()
Reset the
firstSeqNum The stream has an error. |
void |
retry(REQUEST request,
Consumer<REQUEST> sendMethod)
Receive a retry from an existing request (may out-of-order).
|
REQUEST |
submitNewRequest(LongFunction<REQUEST> requestConstructor,
Consumer<REQUEST> sendMethod)
A new request arrives, create it with
nextSeqNum
and then try sending it to the server. |
String |
toString() |
public Client(Object name)
public REQUEST submitNewRequest(LongFunction<REQUEST> requestConstructor, Consumer<REQUEST> sendMethod)
nextSeqNum
and then try sending it to the server.requestConstructor - use seqNum to create a new request.public void retry(REQUEST request, Consumer<REQUEST> sendMethod)
public void receiveReply(long seqNum,
REPLY reply,
Consumer<REQUEST> sendMethod)
public void resetFirstSeqNum()
firstSeqNum The stream has an error.public void fail(long startingSeqNum,
Throwable e)
public boolean isFirst(long seqNum)
Copyright © 2017–2023 The Apache Software Foundation. All rights reserved.