[ZODB-Dev] [Newby] Howto subclass/override IOBTree()

Andreas Schöller schoeller@zkm.de
Tue, 5 Feb 2002 19:57:38 +0100


Hello list,

i´m using ZODB for storage of a bunch of linked Dict´s. Every dict is a 
IOBTree mapping an Integer to an Object.
In case one Object gets deleted I want to reuse the index. So anytime a 
index gets free I put it into a Queue, which is a class-attribut.
Anytime I need a new index my getID() method checks the Queue and 
delivers or increments a counter, which is also a class-attribute.
Is it possible to intercept the deletion of an index. E.g. i say 
_index[12]=None now i want some operator?  to get the index "12" and put 
it into myQueue ?
Second the other way , if I assign a new index like _index
[ ]=OAttribut() is it possible get it from the queue or if empty 
increment my counter ? I need this mechanism in a couple of classes and 
would like the classes to inherit that ?

BTW : Do you have positive experience concerning the robustness of 
OOBTrees ?

thanks, andreas