-
@Service() public final class TokenStatusServiceWe keep track here of the tokens and the amount of events it processed over time. It is updated every 2 seconds and cached in-memory to reduce load on the token stores.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classTokenStatusService.Measurement
-
Constructor Summary
Constructors Constructor Description TokenStatusService(TokenProvider tokenProvider, Serializer serializer, EventStore eventStore)
-
Method Summary
Modifier and Type Method Description final TokenInformationDTOgetTokenInformation()final UnitupdateCachedInformation()final StatisticsgetStatistics(ProcessorId id)final StatisticForSecondscalculateForTimeInSeconds(List<TokenStatusService.Measurement> measurements, Long seconds, Long behind)-
-
Constructor Detail
-
TokenStatusService
TokenStatusService(TokenProvider tokenProvider, Serializer serializer, EventStore eventStore)
-
-
Method Detail
-
getTokenInformation
final TokenInformationDTO getTokenInformation()
-
updateCachedInformation
@Scheduled(fixedRate = 2000.toLong(), initialDelay = 1000.toLong()) final Unit updateCachedInformation()
-
getStatistics
final Statistics getStatistics(ProcessorId id)
-
calculateForTimeInSeconds
final StatisticForSeconds calculateForTimeInSeconds(List<TokenStatusService.Measurement> measurements, Long seconds, Long behind)
-
-
-
-