Package twisted :: Package news :: Module database :: Class PickleStorage

[show private | hide private]
[frames | no frames]

## Class PickleStorage

    NewsStorage --+
                  |
                 PickleStorage

A trivial NewsStorage implementation using pickles

Contains numerous flaws and is generally unsuitable for any real applications. Consider yourself warned!

Method Summary
| `__init__(self, filename, groups, moderators)`
| ``articleExistsRequest`(self, id)` Returns a deferred whose callback will be passed with a true value if a message with the specified Message-ID exists in the database and with a false value otherwise.
| ``articleRequest`(self, group, index, id)` Returns a deferred whose callback will be passed the full article text (headers and body) for the article of the specified index in the specified group, and whose errback will be invoked if the article or group does not exist.
| ``bodyRequest`(self, group, index)` Returns a deferred whose callback will be passed the body for the article of the specified index in the specified group, and whose errback will be invoked if the article or group does not exist.
| `flush(self)`
| `getModerators(self, groups)`
| ``groupRequest`(self, group)` Returns a deferred whose callback will be passed a five-tuple of (group name, article count, highest index, lowest index, group flags)
| ``headRequest`(self, group, index)` Returns a deferred whose callback will be passed the header for the article of the specified index in the specified group, and whose errback will be invoked if the article or group does not exist.
| ``listGroupRequest`(self, group)` Returns a deferred whose callback will be passed a two-tuple of (group name, [article indices])
| ``listRequest`(self)` Returns a list of 4-tuples: (name, max index, min index, flags)
| `load(self, filename, groups, moderators)`
| `notifyModerators(self, moderators, article)`
| ``overviewRequest`(self)` Returns a deferred whose callback will be passed the a list of headers describing this server's overview format. (inherited from `NewsStorage`)
| ``postRequest`(self, message)` Returns a deferred whose callback will be invoked if 'message' is successfully posted to one or more specified groups and whose errback will be invoked otherwise.
| ``subscriptionRequest`(self)` Returns a deferred whose callback will be passed the list of recommended subscription groups for new server users
| ``xhdrRequest`(self, group, low, high, header)` Returns a deferred whose callback will be passed a list of XHDR data for the given group over the given range.
| ``xoverRequest`(self, group, low, high)` Returns a deferred whose callback will be passed a list of xover headers for the given group over the given range.

Class Variable Summary
`dictionary` | `sharedDBs`

Method Details

### articleExistsRequest(self, id)

Returns a deferred whose callback will be passed with a true value if a message with the specified Message-ID exists in the database and with a false value otherwise.

  Overrides:
    `twisted.news.database.NewsStorage.articleExistsRequest` (inherited documentation)

### articleRequest(self, group, index, id=None)

Returns a deferred whose callback will be passed the full article text (headers and body) for the article of the specified index in the specified group, and whose errback will be invoked if the article or group does not exist. If id is not None, index is ignored and the article with the given Message-ID will be returned instead, along with its index in the specified group

  Overrides:
    `twisted.news.database.NewsStorage.articleRequest` (inherited documentation)

### bodyRequest(self, group, index)

Returns a deferred whose callback will be passed the body for the article of the specified index in the specified group, and whose errback will be invoked if the article or group does not exist.

  Overrides:
    `twisted.news.database.NewsStorage.bodyRequest` (inherited documentation)

### groupRequest(self, group)

Returns a deferred whose callback will be passed a five-tuple of (group name, article count, highest index, lowest index, group flags)

  Overrides:
    `twisted.news.database.NewsStorage.groupRequest` (inherited documentation)

### headRequest(self, group, index)

Returns a deferred whose callback will be passed the header for the article of the specified index in the specified group, and whose errback will be invoked if the article or group does not exist.

  Overrides:
    `twisted.news.database.NewsStorage.headRequest` (inherited documentation)

### listGroupRequest(self, group)

Returns a deferred whose callback will be passed a two-tuple of (group name, [article indices])

  Overrides:
    `twisted.news.database.NewsStorage.listGroupRequest` (inherited documentation)

### listRequest(self)

Returns a list of 4-tuples: (name, max index, min index, flags)

### postRequest(self, message)

Returns a deferred whose callback will be invoked if 'message' is successfully posted to one or more specified groups and whose errback will be invoked otherwise.

  Overrides:
    `twisted.news.database.NewsStorage.postRequest` (inherited documentation)

### subscriptionRequest(self)

Returns a deferred whose callback will be passed the list of recommended subscription groups for new server users

  Overrides:
    `twisted.news.database.NewsStorage.subscriptionRequest` (inherited documentation)

### xhdrRequest(self, group, low, high, header)

Returns a deferred whose callback will be passed a list of XHDR data for the given group over the given range. If low is None, the range starts at the first article. If high is None, the range ends at the last article.

  Overrides:
    `twisted.news.database.NewsStorage.xhdrRequest` (inherited documentation)

### xoverRequest(self, group, low, high)

Returns a deferred whose callback will be passed a list of xover headers for the given group over the given range. If low is None, the range starts at the first article. If high is None, the range ends at the last article.

  Overrides:
    `twisted.news.database.NewsStorage.xoverRequest` (inherited documentation)

Class Variable Details

### sharedDBs

  Type:
    `dictionary`
  Value:

        {}

Generated by Epydoc 1.1 on Sat Feb 15 21:19:09 2003 | http://epydoc.sf.net