Commit c1b09c5e authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Sebastien Robin

Use a pseudo-private property for the chunk tree.

parent 350b754b
...@@ -11,11 +11,11 @@ class PersistentString(Persistent): ...@@ -11,11 +11,11 @@ class PersistentString(Persistent):
class BTreeData(Persistent): class BTreeData(Persistent):
def __init__(self): def __init__(self):
self.tree = LOBTree() self._tree = LOBTree()
def write(self, buf, offset): def write(self, buf, offset):
# TODO: auto-aggregation of continuous keys when overwriting # TODO: auto-aggregation of continuous keys when overwriting
tree = self.tree tree = self._tree
buf_len = len(buf) buf_len = len(buf)
try: try:
lower_key = tree.maxKey(offset) lower_key = tree.maxKey(offset)
...@@ -53,7 +53,7 @@ class BTreeData(Persistent): ...@@ -53,7 +53,7 @@ class BTreeData(Persistent):
def read(self, offset, size): def read(self, offset, size):
start_offset = offset start_offset = offset
tree = self.tree tree = self._tree
try: try:
key = tree.maxKey(offset) key = tree.maxKey(offset)
except ValueError: except ValueError:
...@@ -82,7 +82,7 @@ class BTreeData(Persistent): ...@@ -82,7 +82,7 @@ class BTreeData(Persistent):
return result.getvalue() return result.getvalue()
def truncate(self, offset): def truncate(self, offset):
tree = self.tree tree = self._tree
try: try:
key = tree.maxKey(offset) key = tree.maxKey(offset)
except ValueError: except ValueError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment