u.t.QueueProducer(object) : class documentation

Part of udplog.twisted View Source View In Hierarchy

Implements interfaces: udplog.twisted.internet.interfaces.IPushProducer

Push producer with a queue.

This producer accepts items with put that will be delivered to the passed callback if not paused. If the producer is paused, the items get put in a queue. The queue may be limited in size, which causes it to only queue the last n items. Upon resuming, items from the queue will be passed to the callback again.

When the deferred returned by the callback fires, the delivery of the next item in the queue will be scheduled.

Line # Kind Name Docs
253 Method __init__ No summary
279 Method pauseProducing Called when the transport wants to pause receiving data.
288 Method resumeProducing Called when the transport is ready to resume receiving data.
298 Method stopProducing Called when the transport can no longer deliver data.
308 Method put Put a new item for delivery to the protocol using the callback.
320 Method _processQueue Process the next item in queue.
def __init__(self, callback, size=None, clock=None): (source)
ParameterscallbackCallback method that gets items passed to put whenever the producer is not paused. The callback returns a deferred that is waited upon before processing the next item.
sizeOptional queue size. If the queue becomes full, old items are dropped.
clockAn object which provides twisted.internet.interfaces.IReactorTime.
def pauseProducing(self): (source)

Called when the transport wants to pause receiving data.

def resumeProducing(self): (source)

Called when the transport is ready to resume receiving data.

def stopProducing(self): (source)

Called when the transport can no longer deliver data.

def put(self, obj): (source)

Put a new item for delivery to the protocol using the callback.

def _processQueue(self): (source)

Process the next item in queue.

API Documentation for udplog, generated by pydoctor at 2014-02-17 15:26:29.