class documentation

class ShapedConsumer(pcp.ProducerConsumerProxy): (source)

Known subclasses: twisted.protocols.htb.ShapedTransport

View In Hierarchy

Wraps a Consumer and shapes the rate at which it receives data.
Method __init__ Undocumented
Method stopProducing Stop producing data.
Class Variable iAmStreaming Undocumented
Instance Variable bucket Undocumented
Method _writeSomeData Write as much of this data as possible.

Inherited from ProducerConsumerProxy:

Method pauseProducing Undocumented
Method registerProducer Register to receive data from a producer.
Method resumeProducing Undocumented
Method unregisterProducer Stop consuming data from a producer, without disconnecting.
Method write The producer will write data by calling this method.
Class Variable bufferSize Undocumented
Instance Variable outstandingPull Undocumented
Instance Variable paused Undocumented
Instance Variable producerPaused Undocumented
Instance Variable unregistered Undocumented

Inherited from BasicProducerConsumerProxy (via ProducerConsumerProxy):

Method __repr__ Undocumented
Method finish Undocumented
Class Variable stopped Undocumented
Instance Variable consumer the Consumer I publish to.
Instance Variable producer the Producer I subscribe to.
Instance Variable producerIsStreaming Undocumented
Instance Variable _buffer Undocumented
def __init__(self, consumer, bucket): (source)
def stopProducing(self): (source)

Stop producing data.

This tells a producer that its consumer has died, so it must stop producing data for good.

bucket = (source)


def _writeSomeData(self, data): (source)
Write as much of this data as possible.
The number of bytes written.