Coverage for heritrace/counter_handler.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-07-26 08:34 +0000

1# SPDX-FileCopyrightText: 2026 Arcangelo Massari <arcangelo.massari@unibo.it> 

2# 

3# SPDX-License-Identifier: ISC 

4 

5from typing import Protocol, runtime_checkable 

6 

7 

8@runtime_checkable 

9class CounterInitializationPolicy(Protocol): 

10 def should_initialize_from_triplestore(self) -> bool: ... 

11 

12 

13@runtime_checkable 

14class TransactionalCounterHandler(Protocol): 

15 def begin_counter_transaction(self) -> None: ... 

16 

17 def commit_counter_transaction(self) -> None: ... 

18 

19 def rollback_counter_transaction(self) -> None: ...