| Home | Trees | Index | Help |
|
|---|
| Package twisted :: Package protocols :: Module htb :: Class Bucket |
|
Token bucket, or something like it.
I can hold up to a certain number of tokens, and I drain over time.| Method Summary | |
|---|---|
__init__(self,
parentBucket)
| |
| int |
Add tokens to me. |
| bool |
Let some of the bucket drain. |
| Class Variable Summary | |
|---|---|
int |
_refcount = 0 |
| int | maxburst: Size of the bucket, in bytes. |
| int | rate: Rate the bucket drains, in bytes per second. |
| Method Details |
|---|
add(self, amount)Add tokens to me.
|
drip(self)Let some of the bucket drain. How much of the bucket drains depends on how long it has been since I was last called.
|
| Class Variable Details |
|---|
_refcount
|
maxburstSize of the bucket, in bytes. If None, the bucket is never full.
|
rateRate the bucket drains, in bytes per second. If None, the bucket drains instantaneously.
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.0 on Sat May 15 20:07:42 2004 | http://epydoc.sf.net |