Package twisted :: Package protocols :: Module htb :: Class HierarchicalBucketFilter

[show private | hide private]
[frames | no frames]

## Class HierarchicalBucketFilter

Known Subclasses:
  `FilterByServer`, `FilterByHost`

I filter things into buckets, and I am nestable.

Method Summary
| `__init__(self, parentFilter)`
`Bucket` | ``getBucketFor`(self, *a, **kw)` You want a bucket for that? I'll give you a bucket.
| ``getBucketKey`(self, *a, **kw)` I determine who gets which bucket.
| ``sweep`(self)` I throw away references to empty buckets.

Class Variable Summary
`tuple` | `__implements__`
`Bucket` class | `Bucket` - Class of buckets to make.
int | `sweepInterval` - Seconds between sweeping out the bucket cache.

Method Details

### getBucketFor(self, *a, **kw)

You want a bucket for that? I'll give you a bucket.

Any parameters are passed on to `getBucketKey`, from them it decides which bucket you get.

  Returns:
    `Bucket`

### getBucketKey(self, *a, **kw)

I determine who gets which bucket.

Unless I'm overridden, everything gets the same bucket.

  Returns:
    something to be used as a key in the bucket cache.

### sweep(self)

I throw away references to empty buckets.

Class Variable Details

### __implements__

  Type:
    `tuple`
  Value:

        (<class 'twisted.protocols.htb.IBucketFilter'>,)

### Bucket

`Bucket` = `twisted.protocols.htb.Bucket`

### sweepInterval

Seconds between sweeping out the bucket cache.

  Type:
    int
  Value:

        None

Generated by Epydoc 1.1 on Thu May 8 13:18:46 2003 | http://epydoc.sf.net