Skip to content

Conversation

@Nicolapps
Copy link
Contributor

Currently, AbstractFileStore loads segments from the tar files by calling its package-private readSegmentUncached method. This is too limiting when its user needs to customize the segment loading strategy.

This PR allows the user of AbstractFileStore to customize the behavior of readSegmentUncached by adding a new @FunctionalInterface parameter, SegmentLoader. If not set explicitly by the caller, FileStoreBuilder uses an implementation of SegmentLoader which behaves the same way as it currently does, which makes this change backwards-compatible with existing code.

Closes OAK-11155

Currently, `AbstractFileStore` loads segments from the tar files by calling its package-private `readSegmentUncached` method. This is too limiting when its user needs to customize the segment loading strategy.

This PR allows the user of `AbstractFileStore` to customize the behavior of `readSegmentUncached` by adding a new `@FunctionalInterface` parameter, `SegmentLoader`. If not set explicitly by the caller, FileStoreBuilder uses an implementation of `SegmentLoader` which behaves the same way as it currently does, which makes this change backwards-compatible with existing code.

Closes OAK-11155
@Nicolapps Nicolapps marked this pull request as ready for review September 27, 2024 09:47
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.

1 participant