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 public class IntegritySweepService extends BaseComponent
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 Details

    • IntegritySweepService

      public IntegritySweepService()
  • Method Details

    • runSweep

      public IntegritySweepRunDto runSweep(String trigger)
      Executes a full integrity sweep for all notarized nodes.

      The run is created with status RUNNING, updated as nodes are scanned, then finalized as COMPLETED or FAILED. The final run document is persisted and published to the metrics collector even when errors occur.

      Parameters:
      trigger - the run trigger source (for example MANUAL or SCHEDULED); blank values default to MANUAL
      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 sat field.

      Parameters:
      pageable - paging and optional sorting information
      Returns:
      page of recorded IntegritySweepRunDto runs
    • findCorruptedNodes

      public org.springframework.data.domain.Page<CorruptedNodeDto> findCorruptedNodes(org.springframework.data.domain.Pageable pageable)