cengal.io.core.memory_management.versions.v_0.memory_management

 1#!/usr/bin/env python
 2# coding=utf-8
 3
 4# Copyright © 2012-2024 ButenkoMS. All rights reserved. Contacts: <gtalk@butenkoms.space>
 5# 
 6# Licensed under the Apache License, Version 2.0 (the "License");
 7# you may not use this file except in compliance with the License.
 8# You may obtain a copy of the License at
 9# 
10#     http://www.apache.org/licenses/LICENSE-2.0
11# 
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17
18
19__all__ = ['IOCoreMemoryManagement']
20
21
22from cengal.code_flow_control.smart_values import ValueExistence
23
24
25"""
26Module Docstring
27Docstrings: http://www.python.org/dev/peps/pep-0257/
28"""
29
30__author__ = "ButenkoMS <gtalk@butenkoms.space>"
31__copyright__ = "Copyright © 2012-2024 ButenkoMS. All rights reserved. Contacts: <gtalk@butenkoms.space>"
32__credits__ = ["ButenkoMS <gtalk@butenkoms.space>", ]
33__license__ = "Apache License, Version 2.0"
34__version__ = "4.4.1"
35__maintainer__ = "ButenkoMS <gtalk@butenkoms.space>"
36__email__ = "gtalk@butenkoms.space"
37# __status__ = "Prototype"
38__status__ = "Development"
39# __status__ = "Production"
40
41
42class IOCoreMemoryManagement:
43    def __init__(self):
44        self.global__data_size_limit = ValueExistence(True, 2 * 1024**3)
45        self.global__data_full_size = ValueExistence(True, 0)
46        self.global__deletable_data_full_size = ValueExistence(True, 0)
47
48        self.global_other__data_size_limit = ValueExistence(True, 512 * 1024**2)
49        self.global_other__data_full_size = ValueExistence(True, 0)
50        self.global_other__deletable_data_full_size = ValueExistence(True, 0)
51
52        self.global_in__data_size_limit = ValueExistence(True, 512 * 1024**2)
53        self.global_in__data_full_size = ValueExistence(True, 0)
54        self.global_in__deletable_data_full_size = ValueExistence(True, 0)
55
56        self.global_out__data_size_limit = ValueExistence(True, 512 * 1024**2)
57        self.global_out__data_full_size = ValueExistence(True, 0)
58        self.global_out__deletable_data_full_size = ValueExistence(True, 0)
59
60    def link_to(self, parent):
61        self.global__data_size_limit = parent.global__data_size_limit
62        self.global__data_full_size = parent.global__data_full_size
63        self.global__deletable_data_full_size = parent.global__deletable_data_full_size
64
65        self.global_other__data_size_limit = parent.global_other__data_size_limit
66        self.global_other__data_full_size = parent.global_other__data_full_size
67        self.global_other__deletable_data_full_size = parent.global_other__deletable_data_full_size
68
69        self.global_in__data_size_limit = parent.global_in__data_size_limit
70        self.global_in__data_full_size = parent.global_in__data_full_size
71        self.global_in__deletable_data_full_size = parent.global_in__deletable_data_full_size
72
73        self.global_out__data_size_limit = parent.global_out__data_size_limit
74        self.global_out__data_full_size = parent.global_out__data_full_size
75        self.global_out__deletable_data_full_size = parent.global_out__deletable_data_full_size
class IOCoreMemoryManagement:
43class IOCoreMemoryManagement:
44    def __init__(self):
45        self.global__data_size_limit = ValueExistence(True, 2 * 1024**3)
46        self.global__data_full_size = ValueExistence(True, 0)
47        self.global__deletable_data_full_size = ValueExistence(True, 0)
48
49        self.global_other__data_size_limit = ValueExistence(True, 512 * 1024**2)
50        self.global_other__data_full_size = ValueExistence(True, 0)
51        self.global_other__deletable_data_full_size = ValueExistence(True, 0)
52
53        self.global_in__data_size_limit = ValueExistence(True, 512 * 1024**2)
54        self.global_in__data_full_size = ValueExistence(True, 0)
55        self.global_in__deletable_data_full_size = ValueExistence(True, 0)
56
57        self.global_out__data_size_limit = ValueExistence(True, 512 * 1024**2)
58        self.global_out__data_full_size = ValueExistence(True, 0)
59        self.global_out__deletable_data_full_size = ValueExistence(True, 0)
60
61    def link_to(self, parent):
62        self.global__data_size_limit = parent.global__data_size_limit
63        self.global__data_full_size = parent.global__data_full_size
64        self.global__deletable_data_full_size = parent.global__deletable_data_full_size
65
66        self.global_other__data_size_limit = parent.global_other__data_size_limit
67        self.global_other__data_full_size = parent.global_other__data_full_size
68        self.global_other__deletable_data_full_size = parent.global_other__deletable_data_full_size
69
70        self.global_in__data_size_limit = parent.global_in__data_size_limit
71        self.global_in__data_full_size = parent.global_in__data_full_size
72        self.global_in__deletable_data_full_size = parent.global_in__deletable_data_full_size
73
74        self.global_out__data_size_limit = parent.global_out__data_size_limit
75        self.global_out__data_full_size = parent.global_out__data_full_size
76        self.global_out__deletable_data_full_size = parent.global_out__deletable_data_full_size
global__data_size_limit
global__data_full_size
global__deletable_data_full_size
global_other__data_size_limit
global_other__data_full_size
global_other__deletable_data_full_size
global_in__data_size_limit
global_in__data_full_size
global_in__deletable_data_full_size
global_out__data_size_limit
global_out__data_full_size
global_out__deletable_data_full_size