class documentation
A queue for messages to be relayed.
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 | add |
Mark a message as waiting to be relayed unless it is in the process of being relayed. |
Method | create |
Create a new message in the queue. |
Method | done |
Remove a message from the queue. |
Method | get |
Get the envelope for a message. |
Method | get |
Return the envelope file for a message in the queue. |
Method | get |
Return the full base pathname of a message in the queue. |
Method | get |
Return the base filenames of messages in the process of being relayed. |
Method | get |
Return the base filenames of messages waiting to be relayed. |
Method | has |
Return an indication of whether the queue has messages waiting to be relayed. |
Method | read |
Scan the message directory for new messages. |
Method | set |
Mark a message as being relayed. |
Method | set |
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. |
Initialize non-volatile state.
Parameters | |
directory:bytes | The pathname of the directory holding messages in the queue. |
Mark a message as waiting to be relayed unless it is in the process of being relayed.
Parameters | |
message:bytes | The base filename of a message. |
Create a new message in the queue.
Returns | |
2-tuple of (0) file, (1) FileMessage | The envelope file and a message receiver for a new message in the queue. |
Return the envelope file for a message in the queue.
Parameters | |
message:bytes | The base filename of a message. |
Returns | |
file | The envelope file for the message. |
Return an indication of whether the queue has messages waiting to be relayed.
Returns | |
bool | True if messages are waiting to be relayed. False otherwise. |