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

EtagCache Interface #422

Closed
nbartels opened this issue Apr 11, 2016 · 1 comment
Closed

EtagCache Interface #422

nbartels opened this issue Apr 11, 2016 · 1 comment

Comments

@nbartels
Copy link
Contributor

We to provide a EtagCache interface, because every user should be able to create hers own implementation. The current EtagCache implementation (SoftHashMap) is the default.

@nbartels
Copy link
Contributor Author

The solution we implemented works with the Supplier interface. It is possible to override the "MapSupplier" before creating the EtagWebRequestor.

Normally you can create the ETagWebRequestor simply by calling the constructor (new ETagWebRequestor());

Now, it is possible to set the supplier first and create the ETagWebRequestor afterwards with the new mp implementation. Important is that the supplier needs to implement the Map interface.

For example like this:

ETagWebRequestor.setMapSupplier(HashMap::new);
ETagWebRequestor requestor = new ETagWebRequestor();

@nbartels nbartels modified the milestones: Unscheduled, 3.1.0 Jan 16, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant