]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/main/java/org/rocksdb/ConcurrentTaskLimiter.java
import quincy beta 17.1.0
[ceph.git] / ceph / src / rocksdb / java / src / main / java / org / rocksdb / ConcurrentTaskLimiter.java
1 package org.rocksdb;
2
3 public abstract class ConcurrentTaskLimiter extends RocksObject {
4 protected ConcurrentTaskLimiter(final long nativeHandle) {
5 super(nativeHandle);
6 }
7
8 /**
9 * Returns a name that identifies this concurrent task limiter.
10 *
11 * @return Concurrent task limiter name.
12 */
13 public abstract String name();
14
15 /**
16 * Set max concurrent tasks.<br>
17 * limit = 0 means no new task allowed.<br>
18 * limit &lt; 0 means no limitation.
19 *
20 * @param maxOutstandinsTask max concurrent tasks.
21 * @return the reference to the current instance of ConcurrentTaskLimiter.
22 */
23 public abstract ConcurrentTaskLimiter setMaxOutstandingTask(final int maxOutstandinsTask);
24
25 /**
26 * Reset to unlimited max concurrent task.
27 *
28 * @return the reference to the current instance of ConcurrentTaskLimiter.
29 */
30 public abstract ConcurrentTaskLimiter resetMaxOutstandingTask();
31
32 /**
33 * Returns current outstanding task count.
34 *
35 * @return current outstanding task count.
36 */
37 public abstract int outstandingTask();
38 }