/usr/lib64/python2.6/site-packages/mx/BeeBase
NameSizeModeActions
mxBeeBase/-0755rm
BeeBase.py4860644editdlrm
BeeBase.pyc6360644editdlrm
BeeBase.pyo6360644editdlrm
BeeDict.py515460644editdlrm
BeeDict.pyc494510644editdlrm
BeeDict.pyo490180644editdlrm
BeeIndex.py6270644editdlrm
BeeIndex.pyc7680644editdlrm
BeeIndex.pyo7680644editdlrm
BeeStorage.py360760644editdlrm
BeeStorage.pyc318500644editdlrm
BeeStorage.pyo318500644editdlrm
Cache.py67380644editdlrm
Cache.pyc65150644editdlrm
Cache.pyo65150644editdlrm
COPYRIGHT20490644editdlrm
ExitFunctions.py23080644editdlrm
ExitFunctions.pyc28780644editdlrm
ExitFunctions.pyo28780644editdlrm
FileLock.py124190644editdlrm
FileLock.pyc120940644editdlrm
FileLock.pyo120940644editdlrm
LICENSE45870644editdlrm
README1420644editdlrm
showBeeDict.pyc22890644editdlrm
showBeeDict.pyo22890644editdlrm
__init__.py3940644editdlrm
__init__.pyc5560644editdlrm
__init__.pyo5560644editdlrm
Edit: /usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyo (49018B)
Ñò ½ÿGc@s‚dZddkZddkZddkZddkZddklZeiZddkTei Z ei Z dZ dei fd„ƒYZ de fd „ƒYZd efd „ƒYZd e fd „ƒYZdZdZdZdZdfd„ƒYZyeWn,ej o deifd„ƒYZnXdfd„ƒYZdfd„ƒYZdfd„ƒYZdefd„ƒYZdefd„ƒYZeeƒd efd!„ƒYZeeƒd"efd#„ƒYZeeƒd$efd%„ƒYZeeƒd&„Z e!d'jokddk"Z"d(GHed)ƒZ#d*e#d+.dat and .idx. keysize gives the maximal size of the key strings used as index keys. This is only useful for string based keys. min_recordsize is passed to the BeeStorage as indicator of the minimum size for data records. readonly can be set to true to open the files in read-only mode, preventing any disk modifications. To open the dictionary in recovery mode, pass a keyword recover=1. Then run .recover() and reopen using the normal settings. If autocommit is true the cache control will do an automatic .commit() whenever the transaction log overflows. If validate is true, the dictionary will run a validation check after having successfully opened storage and index. RecreateIndexError or RecoverError exceptions could be raised in case inconsistencies are found. index gives the constructor to use for the .index. The constructors BeeIntegerIndex and BeeStringIndex from the BeeIndex module are supported. maxcachesize defines the maximum size of the in-memory transaction cache. It defaults to MAXCACHESIZE if not given. s.dattlocktcacheitmin_recordsizetreadonlytrecoveriiiiiiIiižiskeysize %i is too larges.idxtdupkeystfilemodet sectorsizesunknown index type: %ss%Index for %s "%s" could not be openedN(tnameR tNonet maxcachesizet BeeStoragetBeeKeyValueStoragetstoragetis_newtBeeIndextBeeStringIndextBeeFixedLengthStringIndexRtindextBeeIntegerIndext BeeFloatIndextreprtIOErrortcloseRRRt autocommittvalidate_indextvalidate_storage( tselfRtkeysizeR RRR#tvalidateRRRRtwhy((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyt__init__]sj)                       cCsG|djodS|djodS|djodStd|‚dS( s> Calculate the sectorsize given the keysize. iiiIiižiskeysize %i is too largeN(R(R&R'((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyt_calc_sectorsizeÖs   cCs6|iƒti|idƒti|idƒdS(sÅ Deletes the storage and index files used for the instance. Closes the on-disk dictionary before proceeding with the removal. USE WITH CARE ! s.dats.idxN(R"tostremoveR(R&((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyt remove_filesäs cCs1|io|iƒo td‚nt|iƒS(sV This only gives correct results if no modifications are pending. s/uncommitted data exists; can't calculate length(R tchangedRtlenR(R&((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyt__len__òs cCs]|ipO|iƒx5|i|ifD]!}|dj o|iƒq'q'Wd|_ndS(s¸ Flush buffers and close. This issues a .rollback(), so the current transaction is rolled back. It also frees the lock on the used index. iN(tclosedtrollbackRRRR"(R&tobj((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyR"üs   cCs6|ip(y|iƒWq2|j oq2XndS(sF Make sure the object is closed and locks are freed. N(R2R"(R&tAttributeError((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyt__del__ s  cCsU|iodS|idj o|iiƒn|idj o|iiƒndS(s Flush buffers to disk. N(R2RRtflushR(R&((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyR7s  cCs d|ii|it|ƒfS(Ns<%s instance for "%s" at 0x%x>(t __class__RRtid(R&((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyt__repr__'s cCs/|idj o|iiƒn|iƒdS(sž Commit all changes and start a new transaction. This method does not implement any write operation, but takes care of managing the cache and flushing the storage and index buffers. You must override this method to have commit have any writing effect. The base method must be called after the cache has been processed. N(R RtclearR7(R&((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pytcommit-scCs/|idj o|iiƒn|iƒdS(sï Take back all changes and start a new transaction. Overriding is normally not needed. This method only takes care of managing the cache and flushing the storage and index buffers. N(R RR;R7(R&((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyR3As cCsJ|io<x9|iiƒD]$\}\}}||jodSqWndS(st Return true in case the current transaction includes changes to the database, false otherwise. ii(R titems(R&tmodifiedtkeytstatetvalue((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyR/Qs    cCsÉ|i}x8|iƒD]*\}\}}||jo ||=qqW||ƒ}||ijoe|io|iƒdSttd|ƒ|d|ijo$ttdƒ|iƒtd‚qÅndS(sš Remove all unmodified entries from the cache. If self.autocommit and the cache cleanup did not reduce the size below the .maxcachesize limit, a .commit() will be executed automatically. Otherwise the processing continues. If the cache size hits 2 * .maxcachesize, a forced .rollback() is done and an error raised. Ns*Cache overflow: %i modified items in cacheis$Cache overflow: forced a .rollback()s,cache overflow; last transaction rolled back( R R=RR#R<tlogt SYSTEM_ERRORR3R(R&R0t unmodifiedR R?R@RAtsize((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyt free_cache^s"        cCs td‚dS(s Read and return the value corresponding to key. If checkonly is true, only the availability of a value has to be checked. Override this method with an implementation that accesses the disk. s key not foundN(tKeyError(R&R?t checkonly((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pytreads cCs||f|i||||d|d|d|d|d|dtid|ƒdS( s Create an instance using name as basename for the data and index files. Two files will be created: .dat and .idx. min_recordsize is passed to the BeeStorage as indicator of the minimum size for data records. readonly can be set to true to open the files in read-only mode, preventing any disk modifications. To open the dictionary in recovery mode, pass a keyword recover=1. Then run .recover() and reopen using the normal settings. If autocommit is true the cache control will do an automatic .commit() whenever the transaction log overflows. If validate is true, the dictionary will run a validation check after having successfully opened storage and index. RecreateIndexError or RecoverError exceptions could be raised in case inconsistencies are found. maxcachesize defines the maximum size of the in-memory transaction cache. It defaults to MAXCACHESIZE if not given. R RRR#R(RRN(RR( R&RR RRR#R(Rt basemethod((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyR*‹s !   cCsRxK|iƒo=|i|jodS||ii|iƒjo|iSqWdS(s¬ Find the address of a key by scanning the hash value set pointed to by the cursor. Returns the address of the found key or None. N(RxR?RRRlRA(R&RTt hashvalueR?((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyt find_address²s  cCs²|tjp |tjo|ii||ƒSt|ƒ}|ii|dƒ}|djo|S|i}||ii|ƒjo+|i |||ƒ}|djo|Sn|S(sç Return an index cursor pointing to key. If key is not given, it defaults to FirstKey. In case the key is not found, default is returned. XXX Should use this method in more places... N( RiRuRRTthashRRARRlR‡(R&R?RRR†RTtaddress((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyt index_cursorÄs      cCs8|i}|i}|i}|i}|i}|i} |i} |i} |i} d} xÆ|i i ƒD]µ\}\}}||joó| o t d‚nt |ƒ}||| ƒ}|| j oš|i }|| |ƒjo)|id|_|i|||ƒ}n| |||ƒ}||joqgn|| j o||||ƒqu|||.dat and .idx. keysize gives the maximal size of the strings used as index keys. min_recordsize gives a hint to the expected typical size of (key,value) pickles: all records will have at least this size. To open the dictionary in recovery mode, pass a keyword recover=1. Then run .recover() and reopen using the normal settings. If autocommit is true the cache control will do an automatic .commit() whenever the transaction log overflows. If validate is true, the dictionary will run a validation check after having successfully opened storage and index. RecreateIndexError or RecoverError exceptions could be raised in case inconsistencies are found. maxcachesize defines the maximum size of the in-memory transaction cache. It defaults to MAXCACHESIZE if not given. XXX Save keysize in storage file header. R'R RRR#R(RRN(RR( R&RR'R RRR#R(RR…((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyR*ñs $   cCsS|i}|i}|i}|i}|i}|i} d} xü|iiƒD]ë\} \} } | |jom|| | ƒ}|| j o4|| | |ƒ}||joqLn||| .dat and .idx. keysize gives the maximal size of the strings used as index keys. min_recordsize gives a hint to the expected typical size of (key,value) pickles: all records will have at least this size. To open the dictionary in recovery mode, pass a keyword recover=1. Then run .recover() and reopen using the normal settings. If autocommit is true the cache control will do an automatic .commit() whenever the transaction log overflows. If validate is true, the dictionary will run a validation check after having successfully opened storage and index. RecreateIndexError or RecoverError exceptions could be raised in case inconsistencies are found. maxcachesize defines the maximum size of the in-memory transaction cache. It defaults to MAXCACHESIZE if not given. XXX Save keysize in storage file header. R'R RRR#R(RRN(RR( R&RR'R RRR#R(RR…((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyR*Îs $   N(RRRRR R*(((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyRŸÄs   RžcBs eZdZd„Zd„ZRS(sF Cursor for BeeStringDict and BeeFixedLengthStringDict instances. cCs|iS(s^ Reads the key object from the dict to which the cursor currently points. (R?(R&((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyRlscCs|i|i|ifS(sl Reads the (key, value) item object from the dict to which the cursor currently points. (R?R}(R&((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyRys(RRRRlRy(((s8/usr/lib64/python2.6/site-packages/mx/BeeBase/BeeDict.pyRžüs cOsÞyt|||ƒ}|SWn:tij on&tj ontj onXttd|dƒ|iƒ}d|ds”     ÿÿŽ ˆÿ>+ Ù 4   %