Class FlowControlledReplyChannelWriter<T>
- java.lang.Object
-
- io.axoniq.axonserver.connector.impl.FlowControlledReplyChannelWriter<T>
-
- Type Parameters:
T- the type of message
- All Implemented Interfaces:
FlowControl
public class FlowControlledReplyChannelWriter<T> extends Object implements FlowControl
AFlowControlimplementation that onrequest(long)retrieves messages from thebuffer. These are in turn send via aReplyChannel.- Since:
- 4.6.0
- Author:
- Milan Savic, Stefan Dragisic, Allard Buijze
-
-
Constructor Summary
Constructors Constructor Description FlowControlledReplyChannelWriter(DisposableReadonlyBuffer<T> source, ReplyChannel<T> destination)Instantiates this flow control with the givenDisposableReadonlyBufferas source, and aReplyChannelas the destination.FlowControlledReplyChannelWriter(List<? extends DisposableReadonlyBuffer<T>> sources, ReplyChannel<T> destination)Instantiates this flow control with givenbuffersas sources, andReplyChannelas the destination.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancels response sending.voidrequest(long requested)Requests therequestedamount of responses to be sent.
-
-
-
Constructor Detail
-
FlowControlledReplyChannelWriter
public FlowControlledReplyChannelWriter(List<? extends DisposableReadonlyBuffer<T>> sources, ReplyChannel<T> destination)
Instantiates this flow control with givenbuffersas sources, andReplyChannelas the destination. Buffers will be organized in around-robin fashion.- Parameters:
sources-DisposableReadonlyBuffers to read messages fromdestination-ReplyChannelto write messages to- See Also:
RoundRobinMultiReadonlyBuffer
-
FlowControlledReplyChannelWriter
public FlowControlledReplyChannelWriter(DisposableReadonlyBuffer<T> source, ReplyChannel<T> destination)
Instantiates this flow control with the givenDisposableReadonlyBufferas source, and aReplyChannelas the destination.- Parameters:
source-DisposableReadonlyBufferto read messages fromdestination-ReplyChannelto write messages to
-
-
Method Detail
-
request
public void request(long requested)
Description copied from interface:FlowControlRequests therequestedamount of responses to be sent.- Specified by:
requestin interfaceFlowControl- Parameters:
requested- number of responses to be sent
-
cancel
public void cancel()
Description copied from interface:FlowControlCancels response sending.- Specified by:
cancelin interfaceFlowControl
-
-