public class ComparatorOptions extends RocksObject
nativeHandle_owningHandle_| Constructor and Description |
|---|
ComparatorOptions() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
disposeInternal(long handle) |
int |
maxReusedBufferSize()
Maximum size of a buffer (in bytes) that will be reused.
|
ReusedSynchronisationType |
reusedSynchronisationType()
Get the synchronisation type used to guard the reused buffers.
|
ComparatorOptions |
setMaxReusedBufferSize(int maxReusedBufferSize)
Sets the maximum size of a buffer (in bytes) that will be reused.
|
ComparatorOptions |
setReusedSynchronisationType(ReusedSynchronisationType reusedSynchronisationType)
Set the synchronisation type used to guard the reused buffers.
|
ComparatorOptions |
setUseDirectBuffer(boolean useDirectBuffer)
Controls whether a direct byte buffer (i.e. outside of the normal
garbage-collected heap) is used, as opposed to a non-direct byte buffer
which is a wrapper around an on-heap byte[].
|
boolean |
useDirectBuffer()
Indicates if a direct byte buffer (i.e. outside of the normal
garbage-collected heap) is used, as opposed to a non-direct byte buffer
which is a wrapper around an on-heap byte[].
|
disposeInternal, getNativeHandleclose, disOwnNativeHandle, isOwningHandlepublic ReusedSynchronisationType reusedSynchronisationType()
maxReusedBufferSize() > 0
Default: ReusedSynchronisationType.ADAPTIVE_MUTEXpublic ComparatorOptions setReusedSynchronisationType(ReusedSynchronisationType reusedSynchronisationType)
maxReusedBufferSize() > 0
Default: ReusedSynchronisationType.ADAPTIVE_MUTEXreusedSynchronisationType - the synchronisation typepublic boolean useDirectBuffer()
public ComparatorOptions setUseDirectBuffer(boolean useDirectBuffer)
useDirectBuffer - true if a direct byte buffer should be used,
false otherwisepublic int maxReusedBufferSize()
maxReuseBufferSize, then an
existing buffer will be reused, else a new buffer will be
allocated just for that callback.
Default: 64 bytespublic ComparatorOptions setMaxReusedBufferSize(int maxReusedBufferSize)
maxReuseBufferSize, then an
existing buffer will be reused, else a new buffer will be
allocated just for that callback.
Default: 64 bytesmaxReusedBufferSize - the maximum size for a buffer to reuse, or 0 to
disable reuseprotected final void disposeInternal(long handle)
disposeInternal in class RocksObjectCopyright © 2022. All rights reserved.