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

Minor Release 3.9.0 - Available #2160

Closed
boaks opened this issue Jul 12, 2023 · 11 comments
Closed

Minor Release 3.9.0 - Available #2160

boaks opened this issue Jul 12, 2023 · 11 comments

Comments

@boaks
Copy link
Contributor

boaks commented Jul 12, 2023

See 3.9.0.

@sbernard31
Copy link
Contributor

I know it's a bit a kind of stupid question, but do you think there is some risk of regression or behavior change in this release OR this is just a very minor release with mainly some small fix ?

@boaks
Copy link
Contributor Author

boaks commented Jul 20, 2023

That depends ...

The main change is the switch from LeastRecentlyUsedCache to LeastRecentlyUpdatedCache. I use the LeastRecentlyUpdatedCache now for more than a year without issues. But never say never.

@boaks
Copy link
Contributor Author

boaks commented Jul 20, 2023

The 3.9.0 is released and available on the Eclipse Repository.

The tools and actinium are also available on the Eclipse Repository.

The 3.9.0 is released is also pushed to Maven Central but it will take some time, until it gets available there.

@boaks boaks changed the title Minor Release 3.9.0 - Scheduled for 20. July 2023 Minor Release 3.9.0 - Available Jul 20, 2023
@boaks
Copy link
Contributor Author

boaks commented Jul 20, 2023

The 3.9.0 is now also available on Maven Central.

@sbernard31
Copy link
Contributor

The main change is the switch from LeastRecentlyUsedCache to LeastRecentlyUpdatedCache. I use the LeastRecentlyUpdatedCache now for more than a year without issues. But never say never.

with 3.9.0 LeastRecentlyUsedCache seems deprecated and so Predicate is deprecated too.

I have some code which using it and would like to know how to adapt to not use deprecated code ?

See :

Capture d’écran de 2023-07-21 16-47-31

https://github.com/eclipse-leshan/leshan/blob/master/leshan-server-cf/src/main/java/org/eclipse/leshan/server/californium/ConnectionCleaner.java#L42-L47

@boaks
Copy link
Contributor Author

boaks commented Jul 21, 2023

That's seems to be a very nasty dependency in the API. That set of methods depends on the implementation of the
connection store. I've overseen that.
I don't see a easy fix. Adding the methods using twin API of the new implementation will not be easy to use, but I guess it will be the fastest work-around.

@sbernard31
Copy link
Contributor

Adding the methods using twin API of the new implementation will not be easy to use, but I guess it will be the fastest work-around.

I understand that user will need to call 1 API or another depending of version of used LRU cache ?
If that so, I strongly encourage to search another solution.
OR the new implementation will support both cache ?

@boaks
Copy link
Contributor Author

boaks commented Jul 21, 2023

I investigated more. It's a java 7 rudiment, using java 8 it could be replaced in the API by Function<Connection,Boolean>.

So using the old ones works but reports the "deprecation warning". Otherwise the unit tests would have failed.
Adding new ones with LeastRecentlyUpdatedCache.Predicate<Connection> works then without that warning.
And once switching to Californium 4 and at least java 8, the API could be cleaned up.

@sbernard31
Copy link
Contributor

I looked at the code and I understand there is strictly no reason to reuse LeastRecentlyUsedCache.Predicate for those methods ?
I was thinking that the Predicate instance was passed to LeastRecentlyUsedCache or LeastRecentlyUpdatedCache, but I think this is not the case so it should be better to create a dedicate class (or another dedicated) and so

Adding the methods using twin API of the new implementation will not be easy to use, but I guess it will be the fastest work-around.

Could work as short term workaround (waiting v4.0.0)

@boaks
Copy link
Contributor Author

boaks commented Jul 21, 2023

it should be better to create a dedicate class (or another dedicated) and so

Yes, or half yes.
I think, using the java sdk class will be the the best. But therefore we need to update.
We can now also introduce an independent interface, but if that gets the replaced, the win isn't that large.
But maybe, though some change may take longer, we try to use a separate Predicate.

I will try that out next week.

@boaks
Copy link
Contributor Author

boaks commented Jul 24, 2023

PR #2165 handles the deprecation by introducing a separate interface Filter.

@boaks boaks unpinned this issue Sep 11, 2023
@boaks boaks closed this as completed Sep 16, 2023
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

No branches or pull requests

2 participants