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 OpenSlide cache management API #76

Merged
merged 2 commits into from
Apr 14, 2024
Merged

Conversation

bgilbert
Copy link
Member

Use the same semantics as the OpenSlide API.

The OpenSlide class implements java.io.Closeable, which is documented to be for a source or destination of data that can be closed. OpenSlideCache is technically a source or destination of data, but not at the Java API level, and the only reason it needs to be closeable is to release the underlying resource in the C API. Its superinterface java.lang.AutoCloseable is documented to be for an object that may hold resources [...] until it is closed; implement that instead.

OpenSlide has a legacy dispose() method which is an alias for close(). Don't add a similar method to OpenSlideCache.

Closes: #36

@openslide-bot
Copy link

openslide-bot commented Apr 13, 2024

DCO signed off ✔️

All commits have been signed off. You have certified to the terms of the Developer Certificate of Origin, version 1.1. In particular, you certify that this contribution has not been developed using information obtained under a non-disclosure agreement or other license terms that forbid you from contributing it under the GNU Lesser General Public License, version 2.1.

Signed-off-by: Benjamin Gilbert <[email protected]>
Use the same semantics as the OpenSlide API.

The OpenSlide class implements java.io.Closeable, which is documented to
be for "a source or destination of data that can be closed".
OpenSlideCache is technically a source or destination of data, but not at
the Java API level, and the only reason it needs to be closeable is to
release the underlying resource in the C API.  Its superinterface
java.lang.AutoCloseable is documented to be for "an object that may hold
resources [...] until it is closed"; implement that instead.

OpenSlide has a legacy dispose() method which is an alias for close().
Don't add a similar method to OpenSlideCache.

Closes: openslide#36
Signed-off-by: Benjamin Gilbert <[email protected]>
@bgilbert bgilbert merged commit 3a84c21 into openslide:main Apr 14, 2024
5 checks passed
@bgilbert bgilbert deleted the cache branch April 14, 2024 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support cache management API in OpenSlide 4.0.0
2 participants