Class BootStateMachineMonitor<S,E>
java.lang.Object
org.springframework.statemachine.monitor.AbstractStateMachineMonitor<S,E>
org.springframework.statemachine.boot.support.BootStateMachineMonitor<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Implemented Interfaces:
StateMachineMonitor<S,
E>
Implementation of a
StateMachineMonitor
which converts monitoring
events and bridges those into supported format handled by Spring Boot's
tracing and metrics frameworks.- Author:
- Janne Valkealahti
-
Constructor Summary
ConstructorDescriptionBootStateMachineMonitor
(io.micrometer.core.instrument.MeterRegistry meterRegistry, StateMachineTraceRepository stateMachineTraceRepository) Instantiates a new boot state machine monitor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
action
(StateMachine<S, E> stateMachine, Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action, long duration) Notified duration of a particular action.void
transition
(StateMachine<S, E> stateMachine, Transition<S, E> transition, long duration) Notified duration of a particular transition.
-
Constructor Details
-
BootStateMachineMonitor
public BootStateMachineMonitor(io.micrometer.core.instrument.MeterRegistry meterRegistry, StateMachineTraceRepository stateMachineTraceRepository) Instantiates a new boot state machine monitor.- Parameters:
meterRegistry
- the meter registrystateMachineTraceRepository
- the statemachine trace repository
-
-
Method Details
-
transition
Description copied from interface:StateMachineMonitor
Notified duration of a particular transition.- Specified by:
transition
in interfaceStateMachineMonitor<S,
E> - Overrides:
transition
in classAbstractStateMachineMonitor<S,
E> - Parameters:
stateMachine
- the state machinetransition
- the transitionduration
- the transition duration
-
action
public void action(StateMachine<S, E> stateMachine, Function<StateContext<S, E>, reactor.core.publisher.Mono<Void>> action, long duration) Description copied from interface:StateMachineMonitor
Notified duration of a particular action.- Specified by:
action
in interfaceStateMachineMonitor<S,
E> - Overrides:
action
in classAbstractStateMachineMonitor<S,
E> - Parameters:
stateMachine
- the state machineaction
- the actionduration
- the transition duration
-