Package org.saidone.service.integrity
Class IntegritySweepService
java.lang.Object
org.saidone.component.BaseComponent
org.saidone.service.integrity.IntegritySweepService
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
Service responsible for running end-to-end integrity sweeps across notarized
vault nodes.
Each sweep iterates through notarized nodes in batches, invokes
NotarizationService.checkNotarization(String) for every node, and
persists a summarized IntegritySweepRunDto document that captures
run status, duration, and per-node outcomes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<CorruptedNodeDto> findCorruptedNodes(org.springframework.data.domain.Pageable pageable) org.springframework.data.domain.Page<IntegritySweepRunDto> findRuns(org.springframework.data.domain.Pageable pageable) Retrieves persisted integrity sweep runs using pagination.Executes a full integrity sweep for all notarized nodes.Methods inherited from class org.saidone.component.BaseComponent
init, setApplicationContext, shutDown, stop
-
Constructor Details
-
IntegritySweepService
public IntegritySweepService()
-
-
Method Details
-
runSweep
Executes a full integrity sweep for all notarized nodes.The run is created with status
RUNNING, updated as nodes are scanned, then finalized asCOMPLETEDorFAILED. The final run document is persisted and published to the metrics collector even when errors occur.- Parameters:
trigger- the run trigger source (for exampleMANUALorSCHEDULED); blank values default toMANUAL- Returns:
- persisted sweep run summary with timing and counters
-
findRuns
public org.springframework.data.domain.Page<IntegritySweepRunDto> findRuns(org.springframework.data.domain.Pageable pageable) Retrieves persisted integrity sweep runs using pagination.If the caller does not provide explicit sort criteria, runs are returned in descending order by the
satfield.- Parameters:
pageable- paging and optional sorting information- Returns:
- page of recorded
IntegritySweepRunDtoruns
-
findCorruptedNodes
public org.springframework.data.domain.Page<CorruptedNodeDto> findCorruptedNodes(org.springframework.data.domain.Pageable pageable)
-