Package buildbot :: Package status :: Module persistent_queue :: Class IQueue
[frames] | no frames]

Class IQueue

source code

zope.interface.Interface --+
                           |
                          IQueue

Abstraction of a queue.

Instance Methods
 
pushItem(item)
Adds an individual item to the end of the queue.
source code
 
insertBackChunk(items)
Adds a list of items as the oldest entries.
source code
 
popChunk(nbItems=None)
Pop many items at once.
source code
 
save()
Save the queue to storage if implemented.
source code
 
items()
Returns items in the queue.
source code
 
nbItems()
Returns the number of items in the queue.
source code
 
maxItems()
Returns the maximum number of items this queue can hold.
source code
Class Variables
  __bases__ = (<InterfaceClass zope.interface.Interface>)
  __identifier__ = 'buildbot.status.persistent_queue.IQueue'
  __iro__ = (<InterfaceClass buildbot.status.persistent_queue.IQ...
  __name__ = 'IQueue'
  __sro__ = (<InterfaceClass buildbot.status.persistent_queue.IQ...
  dependents = <WeakKeyDictionary at 67215304>
Method Details

pushItem(item)

source code 

Adds an individual item to the end of the queue.

Returns an item if it was overflowed.

insertBackChunk(items)

source code 

Adds a list of items as the oldest entries.

Normally called in case of failure to process the data, queue the data back so it can be retrieved at a later time.

Returns a list of items if it was overflowed.

popChunk(nbItems=None)

source code 

Pop many items at once. Defaults to self.maxItems().

items()

source code 

Returns items in the queue.

Warning: Can be extremely slow for queue on disk.


Class Variable Details

__iro__

Value:
(<InterfaceClass buildbot.status.persistent_queue.IQueue>,
 <InterfaceClass zope.interface.Interface>)

__sro__

Value:
(<InterfaceClass buildbot.status.persistent_queue.IQueue>,
 <InterfaceClass zope.interface.Interface>)