August'24: Kamaelia is in maintenance mode and will recieve periodic updates, about twice a year, primarily targeted around Python 3 and ecosystem compatibility. PRs are always welcome. Latest Release: 1.14.32 (2024/3/24)

Axon.STM.Store

For examples and more explanations, see the module level docs.


class Store(object)

Store() -> new Store object

A thread-safe versioning store for key-value pairs

You instantiate this as per the documentation for this module

Methods defined here

__can_update(self, key, value)

Returns true if a value can be safely updated. Potentially not thread-safe

__do_update(self, key, value)

Update a key-value pair and increment the version. Not thread-safe

__get(self, key)

Retreive a value. Returns a clone of the Value. Not thread-safe.

__init__(self)

__make(self, key)

Create a new key-value pair. Not thread-safe

dump(self)

set(self, key, value)

Tries to update a value in the store. If the store is already in use a BusyRetry error is raised. If the value has been updated by another thread a ConcurrentUpdate error is raised

set_values(self, D)

Tries to update a selection of values in the store. If the store is already in use a BusyRetry error is raised. If one of the values has been updated by another thread a ConcurrentUpdate error is raised.

usevar(self, key[, islocked])

Tries to get an item from the store. Returns the requested Value object. If the store is already in use a BusyRetry error is raised.

using(self, *keys)

Tries to get a selection of items from the store. Returns a Collection dictionary containing the requested values. If the store is already in use a BusyRetry error is raised.

Feedback

Got a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording!

Please leave you feedback here in reply to the documentation thread in the Kamaelia blog.

-- Automatic documentation generator, 09 Dec 2009 at 04:00:25 UTC/GMT