Part of bzrlib.chk_map View In Hierarchy
An InternalNode is responsible for mapping search key prefixes to child nodes.
Instance Variables | _items | serialised_key => node dictionary. node may be a tuple, LeafNode or InternalNode. |
Method | __init__ | Create a node. |
Method | add_node | Add a child node with prefix prefix, and node node. |
Class Method | deserialise | Deserialise bytes to an InternalNode, with key key. |
Method | iteritems | Undocumented |
Method | map | Map key to value. |
Method | serialise | Serialise the node to store. |
Method | refs | Return the references to other CHK's held by this node. |
Method | unmap | Remove key from this node and its children. |
Method | _current_size | Answer the current serialised size of this node. |
Method | _iter_nodes | Iterate over node objects which match key_filter. |
Method | _new_child | Create a new child node of type klass. |
Method | _search_key | Return the serialised key for key in this node. |
Method | _search_prefix_filter | Serialise key for use as a prefix filter in iteritems. |
Method | _split | Split this node into smaller nodes starting at offset. |
Method | _compute_search_prefix | Return the unique key prefix for this node. |
Method | _check_remap | Check if all keys contained by children fit in a single LeafNode. |
Inherited from Node:
Method | __repr__ | Undocumented |
Method | key | Undocumented |
Method | __len__ | Undocumented |
Method | maximum_size | What is the upper limit for adding references to a node. |
Method | set_maximum_size | Set the size threshold for nodes. |
Class Method | common_prefix | Given 2 strings, return the longest prefix common to both. |
Class Method | common_prefix_for_keys | Given a list of keys, find their common prefix. |
Parameters | key_width | The width of keys for this node. |
Parameters | prefix | The search key prefix for node. |
node | The node being added. |
Parameters | bytes | The bytes of the node. |
key | The key that the serialised node has. | |
Returns | An InternalNode instance. |
Parameters | store | A store to use for accessing content. |
key_filter | A key filter to filter nodes. Only nodes that might contain a key in key_filter will be returned. | |
batch_size | If not None, then we will return the nodes that had to be read using get_record_stream in batches, rather than reading them all at once. | |
Returns | An iterable of nodes. This function does not have to be fully consumed. (There will be no pending I/O when items are being returned.) |
Parameters | store | A VersionedFiles honouring the CHK extensions. |
Returns | An iterable of the keys inserted by this operation. |
Parameters | offset | The offset to start the new child nodes at. |
Returns | An iterable of (prefix, node) tuples. prefix is a byte prefix for reaching node. |