b.r.p.AggregateIndex(object) : class documentation

Part of bzrlib.repofmt.pack_repo View In Hierarchy

An aggregated index for the RepositoryPackCollection.

AggregateIndex is reponsible for managing the PackAccess object, Index-To-Pack mapping, and all indices list for a specific type of index such as 'revision index'.

A CombinedIndex provides an index on a single key space built up from several on-disk indices. The AggregateIndex builds on this to provide a knit access layer, and allows having up to one writable index within the collection.

Method __init__ Create an AggregateIndex.
Method add_index Add index to the aggregate, which is an index for Pack pack.
Method add_writable_index Add an index which is able to have data added to it.
Method clear Reset all the aggregate data to nothing.
Method remove_index Remove index from the indices used to answer queries.
def __init__(self, reload_func=None, flush_func=None):
Create an AggregateIndex.
Parametersreload_funcA function to call if we find we are missing an index. Should have the form reload_func() => True if the list of active pack files has changed.
def add_index(self, index, pack):
Add index to the aggregate, which is an index for Pack pack.

Future searches on the aggregate index will seach this new index before all previously inserted indices.

ParametersindexAn Index for the pack.
packA Pack instance.
def add_writable_index(self, index, pack):
Add an index which is able to have data added to it.

There can be at most one writable index at any time. Any modifications made to the knit are put into this index.

ParametersindexAn index from the pack parameter.
packA Pack instance.
def clear(self):
Reset all the aggregate data to nothing.
def remove_index(self, index):
Remove index from the indices used to answer queries.
ParametersindexAn index from the pack parameter.
API Documentation for Bazaar, generated by pydoctor at 2019-10-23 00:34:42.