-
Notifications
You must be signed in to change notification settings - Fork 14
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
support for custom serializer #2
base: master
Are you sure you want to change the base?
Conversation
@cyrilschumacher I agree this is a needed feature |
My company has been using this in production for months now. I just never got around to making a PR. Do you want more unit test coverage before this is merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @danomatic and thanks for this pull request ;-) Can you look at my comments?
@@ -68,6 +69,7 @@ | |||
private final long ttl; | |||
|
|||
private final Object lock = new Object(); | |||
private Serializer serializer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add final
keyword on this field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
||
import java.io.IOException; | ||
|
||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this Java documentation? or complete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
builder.withSerializer(new JavaSerializer()); | ||
builder.withTTL(TTL); | ||
builder.withFlushOnBoot(false); | ||
builder.build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add assertions on the built object to verify it has been built with the correct values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
); | ||
builder.withTTL(TTL); | ||
builder.withFlushOnBoot(false); | ||
builder.build(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add assertions on the built object to verify it has been built with the correct values?
@danielprplt all the requested changes have been made |
This is really good. |
@danomatic Could you improve the coverage (if possible)? @danielprplt What do you think? |
@danomatic Could you resolve the conflicts present in your branch? I merged your pull request. ;-) |
Allow applications to provide their own serializer, because the Java serializer can be problematic.