class Queue: (source)
Method | __getstate__ |
Create a representation of the non-volatile state of the queue. |
Method | __init__ |
Initialize non-volatile state. |
Method | __setstate__ |
Restore the non-volatile state of the queue and recreate the volatile state. |
Method | addMessage |
Mark a message as waiting to be relayed unless it is in the process of being relayed. |
Method | createNewMessage |
Create a new message in the queue. |
Method | done |
Remove a message from the queue. |
Method | getEnvelope |
Get the envelope for a message. |
Method | getEnvelopeFile |
Return the envelope file for a message in the queue. |
Method | getPath |
Return the full base pathname of a message in the queue. |
Method | getRelayed |
Return the base filenames of messages in the process of being relayed. |
Method | getWaiting |
Return the base filenames of messages waiting to be relayed. |
Method | hasWaiting |
Return an indication of whether the queue has messages waiting to be relayed. |
Method | readDirectory |
Scan the message directory for new messages. |
Method | setRelaying |
Mark a message as being relayed. |
Method | setWaiting |
Mark a message as waiting to be relayed. |
Instance Variable | directory |
See __init__ |
Instance Variable | n |
A number used to form unique filenames. |
Instance Variable | noisy |
A flag which determines whether informational log messages will be generated (True) or not (False). |
Instance Variable | relayed |
The base filenames of messages in the process of being relayed. |
Instance Variable | waiting |
The base filenames of messages waiting to be relayed. |
Method | _init |
Initialize volatile state. |
Parameters | |
directory:bytes | The pathname of the directory holding messages in the queue. |
Parameters | |
message:bytes | The base filename of a message. |
Returns | |
2-tuple of (0) file, (1) FileMessage | The envelope file and a message receiver for a new message in the queue. |
Parameters | |
message:bytes | The base filename of a message. |
Returns | |
file | The envelope file for the message. |
Returns | |
bool | True if messages are waiting to be relayed. False otherwise. |