Part of bzrlib.chk_map View In Hierarchy
| Method | __init__ | Create a CHKMap object. |
| Method | apply_delta | Apply a delta to the map. |
| Class Method | from_dict | Create a CHKMap in store with initial_value as the content. |
| Method | iter_changes | Iterate over the changes between basis and self. |
| Method | iteritems | Iterate over the entire CHKMap's contents. |
| Method | key | Return the key for this map. |
| Method | __len__ | Undocumented |
| Method | map | Map a key tuple to value. |
| Method | unmap | remove key from the map. |
| Method | _ensure_root | Ensure that the root node is an object not a key. |
| Method | _get_node | Get a node. |
| Method | _read_bytes | Undocumented |
| Method | _dump_tree | Return the tree in a string representation. |
| Method | _dump_tree_node | For this node and all children, generate a string representation. |
| Class Method | _create_via_map | Undocumented |
| Class Method | _create_directly | Undocumented |
| Method | _node_key | Get the key for a node whether it's a tuple or node. |
| Method | _check_remap | Check if nodes can be collapsed. |
| Method | _save | Save the map completely. |
| Parameters | store | The store the CHKMap is stored in. |
| root_key | The root key of the map. None to create an empty CHKMap. | |
| search_key_func | A function mapping a key => bytes. These bytes are then used by the internal nodes to split up leaf nodes into multiple pages. |
| Parameters | delta | An iterable of old_key, new_key, new_value tuples. If new_key is not None, then new_key->new_value is inserted into the map; if old_key is not None, then the old mapping of old_key is removed. |
Note that this does not update the _items dict in objects containing a reference to this node. As such it does not prevent subsequent IO being performed.
| Parameters | node | A tuple key or node object. |
| Returns | A node object. | |
| Parameters | store | The store to record initial_value in, a VersionedFiles object with 1-tuple keys supporting CHK key generation. |
| initial_value | A dict to store in store. Its keys and values must be bytestrings. | |
| maximum_size | The maximum_size rule to apply to nodes. This determines the size at which no new data is added to a single node. | |
| key_width | The number of elements in each key_tuple being stored in this map. | |
| search_key_func | A function mapping a key => bytes. These bytes are then used by the internal nodes to split up leaf nodes into multiple pages. | |
| Returns | The root chk of the resulting CHKMap. | |
| Returns | An iterator of tuples: (key, old_value, new_value). Old_value is None for keys only in self; new_value is None for keys only in basis. | |