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
-
Constructor Summary
ConstructorsConstructorDescriptionJdbcEventPublicationRepository(JdbcOperations operations, org.springframework.modulith.events.core.EventSerializer serializer, DatabaseType databaseType) Creates a newJdbcEventPublicationRepositoryfor the givenJdbcOperations,EventSerializerandDatabaseType. -
Method Summary
Modifier and TypeMethodDescriptionorg.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>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) 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
-
JdbcEventPublicationRepository
public JdbcEventPublicationRepository(JdbcOperations operations, org.springframework.modulith.events.core.EventSerializer serializer, DatabaseType databaseType) Creates a newJdbcEventPublicationRepositoryfor the givenJdbcOperations,EventSerializerandDatabaseType.- Parameters:
operations- must not be null.serializer- must not be null.databaseType- must not be null.
-
-
Method Details
-
setBeanClassLoader
- Specified by:
setBeanClassLoaderin interfaceBeanClassLoaderAware
-
create
@Transactional public org.springframework.modulith.events.core.TargetEventPublication create(org.springframework.modulith.events.core.TargetEventPublication publication) - Specified by:
createin interfaceorg.springframework.modulith.events.core.EventPublicationRepository
-
markCompleted
@Transactional public void markCompleted(Object event, org.springframework.modulith.events.core.PublicationTargetIdentifier identifier, Instant completionDate) - Specified by:
markCompletedin 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
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
-