Module org.neo4j.driver
Class LegacyPullAllResponseHandler
java.lang.Object
org.neo4j.driver.internal.handlers.AbstractRecordStateResponseHandler
org.neo4j.driver.internal.handlers.LegacyPullAllResponseHandler
- All Implemented Interfaces:
PullAllResponseHandler
,ResponseHandler
public class LegacyPullAllResponseHandler
extends AbstractRecordStateResponseHandler
implements PullAllResponseHandler
This is the Pull All response handler that handles pull all messages in Bolt v3 and previous protocol versions.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.neo4j.driver.internal.handlers.AbstractRecordStateResponseHandler
AbstractRecordStateResponseHandler.RecordState
-
Field Summary
Fields inherited from class org.neo4j.driver.internal.handlers.AbstractRecordStateResponseHandler
recordState
-
Constructor Summary
ConstructorDescriptionLegacyPullAllResponseHandler
(Query query, RunResponseHandler runResponseHandler, Connection connection, MetadataExtractor metadataExtractor, PullResponseCompletionListener completionListener) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Tells whether this response handler is able to manage auto-read of the underlying connection usingConnection.enableAutoRead()
andConnection.disableAutoRead()
.void
If this response handler is able to manage auto-read of the underlying connection, then this method signals it to stop changing auto-read setting for the connection.<T> CompletionStage<List<T>>
void
void
void
void
Methods inherited from class org.neo4j.driver.internal.handlers.AbstractRecordStateResponseHandler
generateGqlStatusObject
-
Field Details
-
metadataExtractor
-
connection
-
-
Constructor Details
-
LegacyPullAllResponseHandler
public LegacyPullAllResponseHandler(Query query, RunResponseHandler runResponseHandler, Connection connection, MetadataExtractor metadataExtractor, PullResponseCompletionListener completionListener)
-
-
Method Details
-
canManageAutoRead
public boolean canManageAutoRead()Description copied from interface:ResponseHandler
Tells whether this response handler is able to manage auto-read of the underlying connection usingConnection.enableAutoRead()
andConnection.disableAutoRead()
.Implementations can use auto-read management to apply network-level backpressure when receiving a stream of records. 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 racing with each other.
InboundMessageDispatcher
is responsible for tracking these handlers and disabling auto-read management to maintain just a single auto-read managing handler per connection.- Specified by:
canManageAutoRead
in interfaceResponseHandler
-
onSuccess
- Specified by:
onSuccess
in interfaceResponseHandler
-
onFailure
- Specified by:
onFailure
in interfaceResponseHandler
-
onRecord
- Specified by:
onRecord
in interfaceResponseHandler
-
disableAutoReadManagement
public void disableAutoReadManagement()Description copied from interface:ResponseHandler
If this response handler is able to manage auto-read of the underlying connection, then this method signals it to stop changing auto-read setting for the connection.- Specified by:
disableAutoReadManagement
in interfaceResponseHandler
-
peekAsync
- Specified by:
peekAsync
in interfacePullAllResponseHandler
-
nextAsync
- Specified by:
nextAsync
in interfacePullAllResponseHandler
-
consumeAsync
- Specified by:
consumeAsync
in interfacePullAllResponseHandler
-
listAsync
- Specified by:
listAsync
in interfacePullAllResponseHandler
-
prePopulateRecords
public void prePopulateRecords()- Specified by:
prePopulateRecords
in interfacePullAllResponseHandler
-
pullAllFailureAsync
- Specified by:
pullAllFailureAsync
in interfacePullAllResponseHandler
-