Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

danomatic
Copy link

Allow applications to provide their own serializer, because the Java serializer can be problematic.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.5%) to 91.743% when pulling 9739d13 on danomatic:custom-serializer into 99ea324 on arhs:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.5%) to 91.743% when pulling 2a91f66 on danomatic:custom-serializer into 99ea324 on arhs:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-2.5%) to 91.743% when pulling b1bcb83 on danomatic:custom-serializer into 99ea324 on arhs:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.6%) to 92.661% when pulling b1bcb83 on danomatic:custom-serializer into 99ea324 on arhs:master.

@dnlprplt
Copy link
Contributor

@cyrilschumacher I agree this is a needed feature

@danomatic
Copy link
Author

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?

Copy link
Member

@cyrilschumacher cyrilschumacher left a 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;
Copy link
Member

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?

Copy link
Author

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;

/**
Copy link
Member

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?

Copy link
Author

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();
Copy link
Contributor

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?

Copy link
Author

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();
Copy link
Contributor

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?

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.5%) to 92.76% when pulling a107697 on danomatic:custom-serializer into 99ea324 on arhs:master.

@danomatic
Copy link
Author

@danielprplt all the requested changes have been made

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.5%) to 92.76% when pulling ade7b6b on danomatic:custom-serializer into 99ea324 on arhs:master.

@Alir3z4
Copy link

Alir3z4 commented Feb 7, 2018

This is really good.
I'm working on a project and this specific pull requests is very helpful.

@cyrilschumacher
Copy link
Member

@danomatic Could you improve the coverage (if possible)? @danielprplt What do you think?

@cyrilschumacher
Copy link
Member

@danomatic Could you resolve the conflicts present in your branch? I merged your pull request. ;-)

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.

None yet

5 participants