Skip to content

Make driver-, session- and transaction config serializable. #1082

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 12 commits into from
Nov 19, 2021
Merged

Make driver-, session- and transaction config serializable. #1082

merged 12 commits into from
Nov 19, 2021

Conversation

mattcasters
Copy link
Contributor

@mattcasters mattcasters commented Nov 15, 2021

Got stuck with usage of Value in TransactionConfig (for bookmarks) and usage of Optional for fetchSize in SessionConfig.
It's bound to be above my expertise to properly test this.

@michael-simons michael-simons self-assigned this Nov 16, 2021
@michael-simons michael-simons marked this pull request as ready for review November 16, 2021 13:25
@michael-simons michael-simons changed the title Issue #1081 Make driver-, session- and transaction config serializable. Nov 16, 2021
@michael-simons
Copy link
Contributor

I am in strong favor of this change, as we would gain serializable bookmarks with it, too… That makes things in several use-cases I recently discussed with @lqst a lot easier.

As I pushed down the Serializable marker to implementations of theoretically custom-implementable things, the change is not API breaking. All the config classes are not implementable by users.

@injectives
Copy link
Contributor

@michael-simons, thanks a lot for taking care of this.

@mattcasters, would you like to give it a spin to see if everything works as you expect?

@mattcasters
Copy link
Contributor Author

In Apache Hop we switched to google-java-format for reasons like this. Apache Beam is on Spotless / java checker framework. Pick your poison :-)

@michael-simons
Copy link
Contributor

Team checkstyle / Maven enforcer… :D

@mattcasters
Copy link
Contributor Author

4.4-SNAPSHOT driver works for the existing code. Now I'll try to use Config directly eliminating the wrapper code.

@mattcasters
Copy link
Contributor Author

mattcasters commented Nov 18, 2021

I rewrote the Beam Neo4jIO to now allow Config, SessionConfig and TransactionConfig to be passed in since they're now Serializable. This works great! Awesome work guys, thanks a lot!
Do you have an idea if and when this will be available in the next release of neo4j-java-driver?

@injectives
Copy link
Contributor

@mattcasters, unless something urgent comes up, it might get released next week.

@mattcasters
Copy link
Contributor Author

Fantastic news! Thanks @injectives @michael-simons!

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.

3 participants