Package org.rocksdb
Class ConcurrentTaskLimiter
java.lang.Object
org.rocksdb.AbstractNativeReference
org.rocksdb.AbstractImmutableNativeReference
org.rocksdb.RocksObject
org.rocksdb.ConcurrentTaskLimiter
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
ConcurrentTaskLimiterImpl
-
Field Summary
Fields inherited from class org.rocksdb.RocksObject
nativeHandle_Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Stringname()Returns a name that identifies this concurrent task limiter.abstract intReturns current outstanding task count.abstract ConcurrentTaskLimiterReset to unlimited max concurrent task.abstract ConcurrentTaskLimitersetMaxOutstandingTask(int maxOutstandinsTask) Set max concurrent tasks.
limit = 0 means no new task allowed.
limit < 0 means no limitation.Methods inherited from class org.rocksdb.RocksObject
disposeInternal, disposeInternal, getNativeHandleMethods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Constructor Details
-
ConcurrentTaskLimiter
protected ConcurrentTaskLimiter(long nativeHandle)
-
-
Method Details
-
name
Returns a name that identifies this concurrent task limiter.- Returns:
- Concurrent task limiter name.
-
setMaxOutstandingTask
Set max concurrent tasks.
limit = 0 means no new task allowed.
limit < 0 means no limitation.- Parameters:
maxOutstandinsTask- max concurrent tasks.- Returns:
- the reference to the current instance of ConcurrentTaskLimiter.
-
resetMaxOutstandingTask
Reset to unlimited max concurrent task.- Returns:
- the reference to the current instance of ConcurrentTaskLimiter.
-
outstandingTask
public abstract int outstandingTask()Returns current outstanding task count.- Returns:
- current outstanding task count.
-