[storm] Store factory for ZStorm

stuart.bishop at canonical.com stuart.bishop at canonical.com
Mon Jul 6 11:06:59 BST 2009


Hi.

I've been asked to bring up https://code.edge.launchpad.net/~stub/storm/bug-391996/+merge/7924 here.

The goal of this branch is to allow me to alter the Store that ZStorm creates. In particular, for Launchpad I need to change the default Cache implementation and attach some Zope marker Interfaces to the Store after it is created.

I've done this by extending ZStorm.get and ZStorm.create with a store_factory  argument. The default factory is storm.store.Store.

jamesh (who has reviewed this branch so far) felt it necessary to add a configure-once-first API too, so I've also added ZStore.set_default_store_factory to mirror ZStore.set_default_uri.

Passing a factory to ZStorm seems like the cleanest way of supporting my use cases and is also the most flexible.

-- 
Stuart Bishop <stuart at stuartbishop.net>
http://www.stuartbishop.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/storm/attachments/20090706/751a8e1f/attachment.pgp 


More information about the storm mailing list