Home | Trees | Index | Help |
|
---|
Package twisted :: Package world :: Module allocator :: Class FragmentFile |
|
object
--+ |Storable
--+ | FragmentFile
Method Summary | |
---|---|
__init__(self,
db)
| |
POSSIBLY: a method for when objects 'wake up' | |
__finalizers__(self)
| |
_findOIDIndex(self,
oid)
| |
Allocate the given number of bytes. | |
free(self,
oid,
offset,
sz,
dx)
| |
Bind datafile to me and return it. | |
overlapSanityCheck(self)
| |
Pack my fragment-space starting with a recently-freed fragment. | |
Attempt to expand some already-allocated space forwards (move its end to a higher location in the file). | |
Inherited from Storable | |
(Static method) | |
| |
| |
| |
| |
| |
(Class method) | |
Get the database that this object is a member of. | |
Keep me alive until nobody references volatileObject any more. | |
| |
Inherited from object | |
__delattr__(...)
| |
__getattribute__(...)
| |
__hash__(...)
| |
__reduce__(...)
| |
__setattr__(...)
| |
__str__(...)
|
Property Summary | |
---|---|
_schema_genhash : int(_schema_genhash) | |
_schema_oid : int(_schema_oid) | |
allocCount : int(allocCount) | |
fileSize : int(fileSize) | |
fragmentCount : int(fragmentCount) | |
longestFragment : int(longestFragment) | |
maxAllocs : int(maxAllocs) |
Class Variable Summary | |
---|---|
str |
__name__ = 'FragmentFile'
|
dict |
__schema__ = {'allocs': None, 'fragments': None, '_attrc...
|
NoneType |
_attrcache = None |
NoneType |
_inmem_fromdb = None |
NoneType |
_inmem_genhash = None |
NoneType |
_inmem_oid = None |
dict |
_schema_loadmap = {'fragmentCount': 4, 'fileSize': 3, 'a...
|
dict |
_schema_orig = {'allocs': None, 'datafile': None, 'fileS...
|
tuple |
_schema_storeorder = ('_schema_genhash', '_schema_oid', ...
|
NoneType |
_schema_table = None |
NoneType |
allocs = None |
NoneType |
datafile = None |
NoneType |
fragments = None |
Instance Method Details |
---|
__awake__(self)POSSIBLY: a method for when objects 'wake up'
|
findSpace(self, oid, sz)Allocate the given number of bytes. If I can do it, return an (offset,actual) pair that is an offset into me and the amount of actual space allocated. This may be more than requested. The given OID in the same database as me is assumed to own this data chunk and may be asked to relocate it with the 'relocate' method. If I can't, return None. |
getDataFile(self)Bind datafile to me and return it. This makes it so that I do not accidentally go away while others are still holding references to my datafile. |
packFragments(self, begin)Pack my fragment-space starting with a recently-freed fragment. |
reallocateSpace(self, oid, begin, oldSize, newSize, allocIndex)Attempt to expand some already-allocated space forwards (move its end to a higher location in the file). This means we have to either find a fragment that's bumping up against the beginning or end of the already-allocated space, or the already-allocated space is touching the end of the file. If my attempt to request more space was successful, I will return the allocated size, otherwise, None. |
Property Details |
---|
_schema_genhashint(_schema_genhash)
|
_schema_oidint(_schema_oid)
|
allocCountint(allocCount)
|
fileSizeint(fileSize)
|
fragmentCountint(fragmentCount)
|
longestFragmentint(longestFragment)
|
maxAllocsint(maxAllocs)
|
Class Variable Details |
---|
__name__
|
_attrcache
|
_inmem_fromdb
|
_inmem_genhash
|
_inmem_oid
|
_schema_loadmap
|
_schema_orig
|
_schema_storeorder
|
_schema_table
|
allocs
|
datafile
|
fragments
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat Sep 13 04:20:43 2003 | http://epydoc.sf.net |