class documentation

class twisted.protocols.htb.HierarchicalBucketFilter: (source)

Known subclasses: twisted.protocols.htb.FilterByHost, twisted.protocols.htb.FilterByServer

Implements interfaces: twisted.protocols.htb.IBucketFilter

View In Hierarchy

Filter things into buckets that can be nested.

Class Variable bucketFactory Class of buckets to make.
Class Variable sweepInterval Seconds between sweeping out the bucket cache.
Method __init__ Undocumented
Instance Variable buckets Undocumented
Instance Variable parentFilter Undocumented
Instance Variable lastSweep Undocumented
Method getBucketFor Find or create a Bucket corresponding to the provided parameters.
Method getBucketKey Construct a key based on the input parameters to choose a Bucket.
Method sweep Remove empty buckets.
bucketFactory = (source)
Class of buckets to make.
(type: Bucket)
sweepInterval = (source)
Seconds between sweeping out the bucket cache.
(type: int)
def __init__(self, parentFilter=None): (source)

Undocumented

buckets = (source)

Undocumented

(type: dict)
parentFilter = (source)

Undocumented

lastSweep = (source)

Undocumented

def getBucketFor(self, *a, **kw): (source)

Find or create a Bucket corresponding to the provided parameters.

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

ReturnsUndocumented (type: Bucket)
def getBucketKey(self, *a, **kw): (source)

Construct a key based on the input parameters to choose a Bucket.

The default implementation returns the same key for all arguments. Override this method to provide Bucket selection.

ReturnsSomething to be used as a key in the bucket cache.
def sweep(self): (source)

Remove empty buckets.

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.