[
https://issues.apache.org/jira/browse/OAK-11155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17885301#comment-17885301
]
Nicolas Ettlin commented on OAK-11155:
--------------------------------------
PR created here: [GitHub Pull Request
#1747|https://github.com/apache/jackrabbit-oak/pull/1747]
> Allow using a custom segment loading strategy
> ---------------------------------------------
>
> Key: OAK-11155
> URL: https://issues.apache.org/jira/browse/OAK-11155
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar
> Reporter: Nicolas Ettlin
> Priority: Minor
>
> 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.
> Ideally, the user would create a new class that would extend
> AbstractFileStore and overwrite readSegmentUncached. But this is complicated
> to do because in practice, users get their instances through
> FileStoreBuilder, which always instantiates a FileStore the same way.
> My proposal is to allow 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 would use an implementation of SegmentLoader which behaves
> the same way as it currently does, which makes this change
> backwards-compatible with existing code.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)