public class SubscriptionQueryUpdateBuffer extends AbstractBufferedStream<QueryUpdate,SubscriptionQueryRequest>
SubscriptionQuery updates.| Constructor and Description |
|---|
SubscriptionQueryUpdateBuffer(String clientId,
String subscriptionQueryId,
int bufferSize,
int refillBatch)
Instantiates a
SubscriptionQueryUpdateBuffer. |
| Modifier and Type | Method and Description |
|---|---|
protected SubscriptionQueryRequest |
buildFlowControlMessage(FlowControl flowControl)
Build a flow control message of type
OUT based on the given flowControl. |
void |
close()
Requests the current stream to be closed.
|
void |
onCompleted() |
void |
onError(Throwable t) |
void |
onNext(QueryUpdate value) |
protected QueryUpdate |
terminalMessage()
Builds a terminal message of type
T specifying when the this stream is closed. |
getError, isClosed, next, nextIfAvailable, nextIfAvailable, onAvailable, onCloseRequested, peekbeforeStart, getErrorResult, take, tryTake, tryTake, tryTake, tryTakeNowbuildInitialFlowControlMessage, enableFlowControl, markConsumed, outboundStreampublic SubscriptionQueryUpdateBuffer(String clientId, String subscriptionQueryId, int bufferSize, int refillBatch)
SubscriptionQueryUpdateBuffer.clientId - the identifier of the client initiating the subscription querysubscriptionQueryId - the identifier of the subscription query this buffer buffers forbufferSize - the size of this bufferrefillBatch - the number of updates to be consumed prior to refilling this bufferprotected QueryUpdate terminalMessage()
FlowControlledBufferT specifying when the this stream is closed.terminalMessage in class FlowControlledBuffer<QueryUpdate,SubscriptionQueryRequest>T specifying when the this stream is closedprotected SubscriptionQueryRequest buildFlowControlMessage(FlowControl flowControl)
FlowControlledStreamOUT based on the given flowControl.buildFlowControlMessage in class FlowControlledStream<QueryUpdate,SubscriptionQueryRequest>flowControl - the FlowControl message used to base this implementation's flow control message onINpublic void onNext(QueryUpdate value)
onNext in interface io.grpc.stub.StreamObserver<QueryUpdate>onNext in class AbstractBufferedStream<QueryUpdate,SubscriptionQueryRequest>public void onError(Throwable t)
onError in interface io.grpc.stub.StreamObserver<QueryUpdate>onError in class AbstractBufferedStream<QueryUpdate,SubscriptionQueryRequest>public void onCompleted()
onCompleted in interface io.grpc.stub.StreamObserver<QueryUpdate>onCompleted in class AbstractBufferedStream<QueryUpdate,SubscriptionQueryRequest>public void close()
ResultStreamAny elements received before closing are still available for reading.
close in interface ResultStream<QueryUpdate>close in interface AutoCloseableclose in class AbstractBufferedStream<QueryUpdate,SubscriptionQueryRequest>Copyright © 2020–2022 AxonIQ BV. All rights reserved.