MCPcopy Create free account
hub / github.com/ActiveState/code / DAL6

Class DAL6

recipes/Python/492214_dal6py/recipe-492214.py:5–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3################################################################################
4
5class DAL6:
6
7 # Disk Abstraction Layer
8 def __init__(self, blocks, size):
9 self.__disk = DAL5(blocks, size)
10
11 # Get Context Object
12 def new_context(self):
13 return Context(self.__disk)
14
15 # Seed Control Interface
16 def seed(self, data=None):
17 return self.__disk.seed(data)
18
19 # Probability Of Failure
20 def fail(self, probability):
21 self.__disk.fail(probability)
22
23 # Dump To File
24 def dump(self, name):
25 self.__disk.dump(name)
26
27 # Load From File
28 def load(self, name, abstract):
29 assert type(abstract) is bool
30 self.__disk.load(name, abstract)
31
32################################################################################
33

Callers 2

create_diskFunction · 0.85
load_diskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected