Class JdbcEventPublicationRepositoryV2

java.lang.Object
org.springframework.modulith.events.jdbc.JdbcEventPublicationRepositoryV2
All Implemented Interfaces:
Aware, BeanClassLoaderAware, org.springframework.modulith.events.core.EventPublicationRepository

@Transactional class JdbcEventPublicationRepositoryV2 extends Object implements org.springframework.modulith.events.core.EventPublicationRepository, BeanClassLoaderAware
JDBC-based repository to store TargetEventPublications.
Author:
Dmitry Belyaev, Björn Kieling, Oliver Drotbohm, Raed Ben Hamouda, Cora Iberkleid
  • Constructor Details

  • Method Details

    • setBeanClassLoader

      public void setBeanClassLoader(ClassLoader classLoader)
      Specified by:
      setBeanClassLoader in interface BeanClassLoaderAware
    • create

      public org.springframework.modulith.events.core.TargetEventPublication create(org.springframework.modulith.events.core.TargetEventPublication publication)
      Specified by:
      create in interface org.springframework.modulith.events.core.EventPublicationRepository
    • markProcessing

      public void markProcessing(UUID identifier)
      Specified by:
      markProcessing in interface org.springframework.modulith.events.core.EventPublicationRepository
    • markCompleted

      public void markCompleted(Object event, org.springframework.modulith.events.core.PublicationTargetIdentifier identifier, Instant completionDate)
      Specified by:
      markCompleted in interface org.springframework.modulith.events.core.EventPublicationRepository
    • markCompleted

      public void markCompleted(UUID identifier, Instant completionDate)
      Specified by:
      markCompleted in interface org.springframework.modulith.events.core.EventPublicationRepository
    • markFailed

      public void markFailed(UUID identifier)
      Specified by:
      markFailed in interface org.springframework.modulith.events.core.EventPublicationRepository
    • markResubmitted

      public boolean markResubmitted(UUID identifier, Instant instant)
      Specified by:
      markResubmitted in interface org.springframework.modulith.events.core.EventPublicationRepository
    • findIncompletePublicationsByEventAndTargetIdentifier

      @Transactional(readOnly=true) public Optional<org.springframework.modulith.events.core.TargetEventPublication> findIncompletePublicationsByEventAndTargetIdentifier(Object event, org.springframework.modulith.events.core.PublicationTargetIdentifier targetIdentifier)
      Specified by:
      findIncompletePublicationsByEventAndTargetIdentifier in interface org.springframework.modulith.events.core.EventPublicationRepository
    • findCompletedPublications

      public List<org.springframework.modulith.events.core.TargetEventPublication> findCompletedPublications()
      Specified by:
      findCompletedPublications in interface org.springframework.modulith.events.core.EventPublicationRepository
    • findIncompletePublications

      @Transactional(readOnly=true) public List<org.springframework.modulith.events.core.TargetEventPublication> findIncompletePublications()
      Specified by:
      findIncompletePublications in interface org.springframework.modulith.events.core.EventPublicationRepository
    • findIncompletePublicationsPublishedBefore

      @Transactional(readOnly=true) public List<org.springframework.modulith.events.core.TargetEventPublication> findIncompletePublicationsPublishedBefore(Instant instant)
      Specified by:
      findIncompletePublicationsPublishedBefore in interface org.springframework.modulith.events.core.EventPublicationRepository
    • deletePublications

      public void deletePublications(List<UUID> identifiers)
      Specified by:
      deletePublications in interface org.springframework.modulith.events.core.EventPublicationRepository
    • deleteCompletedPublications

      public void deleteCompletedPublications()
      Specified by:
      deleteCompletedPublications in interface org.springframework.modulith.events.core.EventPublicationRepository
    • deleteCompletedPublicationsBefore

      public void deleteCompletedPublicationsBefore(Instant instant)
      Specified by:
      deleteCompletedPublicationsBefore in interface org.springframework.modulith.events.core.EventPublicationRepository
    • findByStatus

      public List<org.springframework.modulith.events.core.TargetEventPublication> findByStatus(org.springframework.modulith.events.EventPublication.Status status)
      Specified by:
      findByStatus in interface org.springframework.modulith.events.core.EventPublicationRepository
    • countByStatus

      public int countByStatus(org.springframework.modulith.events.EventPublication.Status status)
      Specified by:
      countByStatus in interface org.springframework.modulith.events.core.EventPublicationRepository
    • findFailedPublications

      @Transactional(readOnly=true) public List<org.springframework.modulith.events.core.TargetEventPublication> findFailedPublications(org.springframework.modulith.events.core.EventPublicationRepository.FailedCriteria criteria)
      Specified by:
      findFailedPublications in interface org.springframework.modulith.events.core.EventPublicationRepository