Skip to content

Change access modifier for readAdvise in MMapDirectory#15892

Open
navneet1v wants to merge 1 commit intoapache:mainfrom
navneet1v:changeRDAccess
Open

Change access modifier for readAdvise in MMapDirectory#15892
navneet1v wants to merge 1 commit intoapache:mainfrom
navneet1v:changeRDAccess

Conversation

@navneet1v
Copy link
Copy Markdown
Contributor

Description

Change access modifier for readAdvise in MMapDirectory. Made the access modifier protected so that classes which overrides MMapDirectory can use the readAdvise or if needed expose them.

I considered adding a getter for this parameter too, but went against it since the return type is pretty weird. I am open to adding a getting too. If we are happy with a getter like this:

public BiFunction<String, IOContext, Optional<ReadAdvice>> getReadAdvise() {
  return readAdvice;
}

or we can also expose a function like

public ReadAdvice getReadAdviseForFile(String filename, IOContext ioContext) {
    return readAdvice.apply(filename, ioContext);
}

This will ensure that consumers can validate if readAdvise is correctly set or not.

@navneet1v
Copy link
Copy Markdown
Contributor Author

Will set change log soon

Signed-off-by: Navneet Verma <navneev@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant