Skip to content

Commit c990a76

Browse files
author
Ankit Gupta
committed
Add documentation for JNI options
1 parent 63d74d2 commit c990a76

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

java/org/rocksdb/Options.java

+46
Original file line numberDiff line numberDiff line change
@@ -107,31 +107,77 @@ public int maxWriteBufferNumber() {
107107
return maxWriteBufferNumber(nativeHandle_);
108108
}
109109

110+
/*
111+
* Approximate size of user data packed per block. Note that the
112+
* block size specified here corresponds to uncompressed data. The
113+
* actual size of the unit read from disk may be smaller if
114+
* compression is enabled. This parameter can be changed dynamically.
115+
*
116+
* Default: 4K
117+
*
118+
* @param block size
119+
* @see RocksDB::Open()
120+
*/
110121
public void setBlockSize(int blockSize) {
111122
checkInitialization();
112123
setBlockSize(nativeHandle_, blockSize);
113124
}
114125

126+
/*
127+
* Returns block size.
128+
*
129+
* @return block size.
130+
* @see setBlockSize()
131+
*/
115132
public int blockSize() {
116133
checkInitialization();
117134
return blockSize(nativeHandle_);
118135
}
119136

137+
/*
138+
* Disable compaction triggered by seek.
139+
* With bloomfilter and fast storage, a miss on one level
140+
* is very cheap if the file handle is cached in table cache
141+
* (which is true if max_open_files is large).
142+
*
143+
* @param disable seek compaction
144+
* @see RocksDB::Open()
145+
*/
120146
public void setDisableSeekCompaction(boolean disableSeekCompaction) {
121147
checkInitialization();
122148
setDisableSeekCompaction(nativeHandle_, disableSeekCompaction);
123149
}
124150

151+
/*
152+
* Returns true if disable seek compaction is set to true.
153+
*
154+
* @return true if disable seek compaction is set to true.
155+
* @see setDisableSeekCompaction()
156+
*/
125157
public boolean disableSeekCompaction() {
126158
checkInitialization();
127159
return disableSeekCompaction(nativeHandle_);
128160
}
129161

162+
/*
163+
* Maximum number of concurrent background jobs, submitted to
164+
* the default LOW priority thread pool
165+
* Default: 1
166+
*
167+
* @param maximum number of concurrent background jobs.
168+
* @see RocksDB::Open()
169+
*/
130170
public void setMaxBackgroundCompactions(int maxBackgroundCompactions) {
131171
checkInitialization();
132172
setMaxBackgroundCompactions(nativeHandle_, maxBackgroundCompactions);
133173
}
134174

175+
/*
176+
* Returns maximum number of background concurrent jobs
177+
*
178+
* @return maximum number of background concurrent jobs
179+
* @see setMaxBackgroundCompactions
180+
*/
135181
public int maxBackgroundCompactions() {
136182
checkInitialization();
137183
return maxBackgroundCompactions(nativeHandle_);

0 commit comments

Comments
 (0)