Package pyanaconda :: Package storage :: Module partitioning :: Class Chunk
[hide private]
[frames] | no frames]

Class Chunk

source code

object --+
         |
        Chunk

A free region from which devices will be allocated

Instance Methods [hide private]
 
__init__(self, length, requests=None)
Create a Chunk instance.
source code
 
__repr__(self)
repr(x)
source code
 
__str__(self)
str(x)
source code
 
addRequest(self, req)
Add a Request to this chunk.
source code
 
growth(self)
Sum of growth for all requests in this chunk.
source code
 
hasGrowable(self)
True if this chunk contains at least one growable request.
source code
 
remaining(self)
Number of requests still being grown in this chunk.
source code
 
done(self)
True if we are finished growing all requests in this chunk.
source code
 
maxGrowth(self, req) source code
 
lengthToSize(self, length) source code
 
sizeToLength(self, size) source code
 
trimOverGrownRequest(self, req, base=None)
Enforce max growth and return extra units to the pool.
source code
 
sortRequests(self) source code
 
growRequests(self)
Calculate growth amounts for requests in this chunk.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, length, requests=None)
(Constructor)

source code 
Create a Chunk instance.

Arguments:

    length -- the length of the chunk in allocation units


Keyword Arguments:

    requests -- list of Request instances allocated from this chunk

Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

growth(self)

source code 

Sum of growth for all requests in this chunk.

Decorators:
  • @property

hasGrowable(self)

source code 

True if this chunk contains at least one growable request.

Decorators:
  • @property

remaining(self)

source code 

Number of requests still being grown in this chunk.

Decorators:
  • @property

done(self)

source code 

True if we are finished growing all requests in this chunk.

Decorators:
  • @property