Skip to content

Refactoring the stream observer to use a state machine #515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 9, 2020

Conversation

zhenlineo
Copy link
Contributor

to describe the inner state changes.
This stream observer is used as reactive run and pull handler, async run and pull handler, as well as other message handlers.
For reactive run and pull handler, the start state is READY state where a run message is sent and we will auto write a pull message once the run message reply is received.
For async run and pull handler, the start state is READY_STREAMING where a run and a pull message are sent and we will auto write a pull message once a pull message reply is received with has_more flag.
For other single message handlers, the start state is STREAMING where we will wait for a success reply and save all meta received.

Zhen Li added 2 commits December 18, 2019 17:16
to describe the inner state changes.
This stream observer is used as reactive run and pull handler, async run and pull handler, as well as other message handlers.
For reactive run and pull handler, the start state is `READY` state where a run message is sent and we will auto write a pull message once the run message reply is received.
For async run and pull handler, the start state is `READY_STREAMING` where a run and a pull message are sent and we will auto write a pull message once apull message reply is received with has_more flag.
For other single message handlers, the start state is `STREAMING` where we will wait for a success reply and save all meta received.
@zhenlineo zhenlineo merged commit a42db01 into neo4j:4.0 Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant