]>
git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/src/main/java/org/rocksdb/ConcurrentTaskLimiter.java
1 // Copyright (c) Meta Platforms, Inc. and affiliates.
3 // This source code is licensed under both the GPLv2 (found in the
4 // COPYING file in the root directory) and Apache 2.0 License
5 // (found in the LICENSE.Apache file in the root directory).
9 public abstract class ConcurrentTaskLimiter
extends RocksObject
{
10 protected ConcurrentTaskLimiter(final long nativeHandle
) {
15 * Returns a name that identifies this concurrent task limiter.
17 * @return Concurrent task limiter name.
19 public abstract String
name();
22 * Set max concurrent tasks.<br>
23 * limit = 0 means no new task allowed.<br>
24 * limit < 0 means no limitation.
26 * @param maxOutstandinsTask max concurrent tasks.
27 * @return the reference to the current instance of ConcurrentTaskLimiter.
29 public abstract ConcurrentTaskLimiter
setMaxOutstandingTask(final int maxOutstandinsTask
);
32 * Reset to unlimited max concurrent task.
34 * @return the reference to the current instance of ConcurrentTaskLimiter.
36 public abstract ConcurrentTaskLimiter
resetMaxOutstandingTask();
39 * Returns current outstanding task count.
41 * @return current outstanding task count.
43 public abstract int outstandingTask();