2021-01-05 10:22:48 +00:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
2022-01-24 08:53:30 +00:00
|
|
|
# pyright: strict
|
2021-01-11 17:44:39 +00:00
|
|
|
from abc import ABC, abstractmethod
|
2022-01-24 08:53:30 +00:00
|
|
|
from typing import Optional
|
2021-01-05 10:22:48 +00:00
|
|
|
|
|
|
|
|
2021-01-11 17:44:39 +00:00
|
|
|
class SharedDict(ABC):
|
|
|
|
@abstractmethod
|
2022-01-24 08:53:30 +00:00
|
|
|
def get_int(self, key: str) -> Optional[int]:
|
2021-01-05 10:22:48 +00:00
|
|
|
pass
|
|
|
|
|
2021-01-11 17:44:39 +00:00
|
|
|
@abstractmethod
|
2022-01-24 08:53:30 +00:00
|
|
|
def set_int(self, key: str, value: int):
|
2021-01-05 10:22:48 +00:00
|
|
|
pass
|
|
|
|
|
2021-01-11 17:44:39 +00:00
|
|
|
@abstractmethod
|
2022-01-24 08:53:30 +00:00
|
|
|
def get_str(self, key: str) -> Optional[str]:
|
2021-01-05 10:22:48 +00:00
|
|
|
pass
|
|
|
|
|
2021-01-11 17:44:39 +00:00
|
|
|
@abstractmethod
|
2022-01-24 08:53:30 +00:00
|
|
|
def set_str(self, key: str, value: str):
|
2021-01-05 10:22:48 +00:00
|
|
|
pass
|