Class JdbcEventPublicationRepository

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

class JdbcEventPublicationRepository 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

      @Transactional 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
    • markCompleted

      @Transactional 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

      @Transactional public void markCompleted(UUID identifier, Instant completionDate)
      Specified by:
      markCompleted 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

      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