-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Add [set]DailyOffpeakTimeUTC option to Java API #13148
base: main
Are you sure you want to change the base?
Add [set]DailyOffpeakTimeUTC option to Java API #13148
Conversation
Reflect RocksDB DailyOffpeakTimeUTC option in Java API. As is standard for options, there are a number of different places where this option needs to be added. The new option is a string value. This requires an extension to the internal MutableDBOptions parse code, which received the entire options string from C++ and parses it on the Java side.
@@ -759,6 +759,19 @@ public long compactionReadaheadSize() { | |||
return compactionReadaheadSize(nativeHandle_); | |||
} | |||
|
|||
@Override | |||
public DBOptions setDailyOffpeakTimeUTC(String offpeakTimeUTC) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good design. Somebody can say that java date/time data structures can be better, but conversion will probably make more problems. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought hard about that. If I would use the the java date/time, I need to parse the HH:mm-HH:mm format. Better to just present the same string as RockSDB does.
LGTM |
2bb94d2
to
a5cc7ab
Compare
Reflect RocksDB DailyOffpeakTimeUTC option in Java API. As is standard for options, there are a number of different places where this option needs to be added: it is an option, a DB option, and it is mutable (can be changed while running).
The new option is a string value. This requires an extension to the internal MutableDBOptions parse code, which received the entire options string from C++ and parses it on the Java side.