b.c.Node(object) : class documentation

Part of bzrlib.chk_map View In Hierarchy

Known subclasses: bzrlib.chk_map.InternalNode, bzrlib.chk_map.LeafNode

Base class defining the protocol for CHK Map nodes.
Instance Variables_raw_sizeThe total size of the serialized key:value data, before adding the header bytes, and without prefix compression.
Method __init__ Create a 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.
def __init__(self, key_width=1):
Create a node.
Parameterskey_widthThe width of keys for this node.
def __repr__(self):
Undocumented
def key(self):
Undocumented
def __len__(self):
Undocumented
@property
def maximum_size(self):
What is the upper limit for adding references to a node.
def set_maximum_size(self, new_size):
Set the size threshold for nodes.
Parametersnew_sizeThe size at which no data is added to a node. 0 for unlimited.
@classmethod
def common_prefix(cls, prefix, key):
Given 2 strings, return the longest prefix common to both.
ParametersprefixThis has been the common prefix for other keys, so it is more likely to be the common prefix in this case as well.
keyAnother string to compare to
@classmethod
def common_prefix_for_keys(cls, keys):
Given a list of keys, find their common prefix.
ParameterskeysAn iterable of strings.
ReturnsThe longest common prefix of all keys.
API Documentation for Bazaar, generated by pydoctor at 2019-11-21 00:29:25.