Module spring.modulith.events.jdbc
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.modulith.events.core.EventPublicationRepository
org.springframework.modulith.events.core.EventPublicationRepository.FailedCriteria -
Constructor Summary
ConstructorsConstructorDescriptionJdbcEventPublicationRepositoryV2(JdbcOperations operations, org.springframework.modulith.events.core.EventSerializer serializer, JdbcRepositorySettings settings) Creates a newJdbcEventPublicationRepositoryfor the givenJdbcOperations,EventSerializer,DatabaseTypeandJdbcConfigurationProperties. -
Method Summary
Modifier and TypeMethodDescriptionintcountByStatus(org.springframework.modulith.events.EventPublication.Status status) org.springframework.modulith.events.core.TargetEventPublicationcreate(org.springframework.modulith.events.core.TargetEventPublication publication) voidvoiddeleteCompletedPublicationsBefore(Instant instant) voiddeletePublications(List<UUID> identifiers) List<org.springframework.modulith.events.core.TargetEventPublication>findByStatus(org.springframework.modulith.events.EventPublication.Status status) List<org.springframework.modulith.events.core.TargetEventPublication>List<org.springframework.modulith.events.core.TargetEventPublication>findFailedPublications(org.springframework.modulith.events.core.EventPublicationRepository.FailedCriteria criteria) List<org.springframework.modulith.events.core.TargetEventPublication>Optional<org.springframework.modulith.events.core.TargetEventPublication>findIncompletePublicationsByEventAndTargetIdentifier(Object event, org.springframework.modulith.events.core.PublicationTargetIdentifier targetIdentifier) List<org.springframework.modulith.events.core.TargetEventPublication>voidmarkCompleted(Object event, org.springframework.modulith.events.core.PublicationTargetIdentifier identifier, Instant completionDate) voidmarkCompleted(UUID identifier, Instant completionDate) voidmarkFailed(UUID identifier) voidmarkProcessing(UUID identifier) booleanmarkResubmitted(UUID identifier, Instant instant) voidsetBeanClassLoader(ClassLoader classLoader) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.modulith.events.core.EventPublicationRepository
markCompleted
-
Constructor Details
-
JdbcEventPublicationRepositoryV2
public JdbcEventPublicationRepositoryV2(JdbcOperations operations, org.springframework.modulith.events.core.EventSerializer serializer, JdbcRepositorySettings settings) Creates a newJdbcEventPublicationRepositoryfor the givenJdbcOperations,EventSerializer,DatabaseTypeandJdbcConfigurationProperties.- Parameters:
operations- must not be null.serializer- must not be null.settings- must not be null.
-
-
Method Details
-
setBeanClassLoader
- Specified by:
setBeanClassLoaderin interfaceBeanClassLoaderAware
-
create
public org.springframework.modulith.events.core.TargetEventPublication create(org.springframework.modulith.events.core.TargetEventPublication publication) - Specified by:
createin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
markProcessing
- Specified by:
markProcessingin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
markCompleted
public void markCompleted(Object event, org.springframework.modulith.events.core.PublicationTargetIdentifier identifier, Instant completionDate) - Specified by:
markCompletedin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
markCompleted
- Specified by:
markCompletedin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
markFailed
- Specified by:
markFailedin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
markResubmitted
- Specified by:
markResubmittedin interfaceorg.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:
findIncompletePublicationsByEventAndTargetIdentifierin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
findCompletedPublications
public List<org.springframework.modulith.events.core.TargetEventPublication> findCompletedPublications()- Specified by:
findCompletedPublicationsin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
findIncompletePublications
@Transactional(readOnly=true) public List<org.springframework.modulith.events.core.TargetEventPublication> findIncompletePublications()- Specified by:
findIncompletePublicationsin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
findIncompletePublicationsPublishedBefore
@Transactional(readOnly=true) public List<org.springframework.modulith.events.core.TargetEventPublication> findIncompletePublicationsPublishedBefore(Instant instant) - Specified by:
findIncompletePublicationsPublishedBeforein interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
deletePublications
- Specified by:
deletePublicationsin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
deleteCompletedPublications
public void deleteCompletedPublications()- Specified by:
deleteCompletedPublicationsin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
deleteCompletedPublicationsBefore
- Specified by:
deleteCompletedPublicationsBeforein interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
findByStatus
public List<org.springframework.modulith.events.core.TargetEventPublication> findByStatus(org.springframework.modulith.events.EventPublication.Status status) - Specified by:
findByStatusin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
countByStatus
public int countByStatus(org.springframework.modulith.events.EventPublication.Status status) - Specified by:
countByStatusin interfaceorg.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:
findFailedPublicationsin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-