You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -29,4 +30,27 @@ public interface ResponseHandler
29
30
voidonFailure( Throwableerror );
30
31
31
32
voidonRecord( Value[] fields );
33
+
34
+
/**
35
+
* Tells whether this response handler is able to manage auto-read of the underlying connection using {@link Connection#enableAutoRead()} and
36
+
* {@link Connection#disableAutoRead()}.
37
+
* <p>
38
+
* Implementations can use auto-read management to apply network-level backpressure when receiving a stream of records.
39
+
* There should only be a single such handler active for a connection at one point in time. Otherwise, handlers can interfere and turn on/off auto-read
40
+
* racing with each other. {@link InboundMessageDispatcher} is responsible for tracking these handlers and disabling auto-read management to maintain just
41
+
* a single auto-read managing handler per connection.
42
+
*/
43
+
defaultbooleancanManageAutoRead()
44
+
{
45
+
returnfalse;
46
+
}
47
+
48
+
/**
49
+
* If this response handler is able to manage auto-read of the underlying connection, then this method signals it to
50
+
* stop changing auto-read setting for the connection.
0 commit comments