Coverage for src/dataknobs_fsm/core/modes.py: 100%

1"""Processing and transaction modes for FSM execution."""

2

3 from enum import Enum

4

5

6 class ProcessingMode(Enum):

7 """Processing mode for FSM execution - defines how many records to process."""

8

9 SINGLE = "single"

10 """Process a single record at a time."""

11

12 BATCH = "batch"

13 """Process multiple records in a batch."""

14

15 STREAM = "stream"

16 """Process continuous stream of data."""

17

18

19 class TransactionMode(Enum):

20 """Transaction handling mode for FSM execution."""

21

22 NONE = "none"

23 """No transaction support."""

24

25 PER_RECORD = "per_record"

26 """One transaction per record."""

27

28 PER_BATCH = "per_batch"

29 """One transaction per batch."""

30

31 PER_SESSION = "per_session"

32 """One transaction for entire session."""

33

34 DISTRIBUTED = "distributed"

35 """Distributed transaction support."""