]>
git.proxmox.com Git - ceph.git/blob - ceph/src/common/ThrottleInterface.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
8 class ThrottleInterface
{
10 virtual ~ThrottleInterface() {}
12 * take the specified number of slots from the stock regardless the throttling
13 * @param c number of slots to take
14 * @returns the total number of taken slots
16 virtual int64_t take(int64_t c
= 1) = 0;
18 * put slots back to the stock
19 * @param c number of slots to return
20 * @returns number of requests being hold after this
22 virtual int64_t put(int64_t c
= 1) = 0;