Interface IncrementalSyncSubscriptionRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<IncrementalSyncSubscriptionEntity,Long>, org.springframework.data.jpa.repository.JpaRepository<IncrementalSyncSubscriptionEntity,Long>, org.springframework.data.repository.ListCrudRepository<IncrementalSyncSubscriptionEntity,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<IncrementalSyncSubscriptionEntity,Long>, org.springframework.data.repository.PagingAndSortingRepository<IncrementalSyncSubscriptionEntity,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<IncrementalSyncSubscriptionEntity>, org.springframework.data.repository.Repository<IncrementalSyncSubscriptionEntity,Long>

@Repository public interface IncrementalSyncSubscriptionRepository extends org.springframework.data.jpa.repository.JpaRepository<IncrementalSyncSubscriptionEntity,Long>
Since:
10.0.0
  • Method Details

    • store

      Add or update an IncrementalSyncSubscriptionEntity. This method will update setLastAccessTime
    • getSubscriptionById

      Optional<IncrementalSyncSubscriptionEntity> getSubscriptionById(long id)
      Get Subscription by Id
    • findSubscriptionByContextKey

      List<IncrementalSyncSubscriptionEntity> findSubscriptionByContextKey(String context)
      Get all subscription within a context
    • findSubscriptionsByContextKeyAndState

      List<IncrementalSyncSubscriptionEntity> findSubscriptionsByContextKeyAndState(String contextKey, String state)
      Get all subscription within a context and state
    • findSubscriptionsByContextKeyAndState

      default List<IncrementalSyncSubscriptionEntity> findSubscriptionsByContextKeyAndState(String contextKey, IncrementalSyncState state)
      Get all subscription within a context and state
    • removeSubscriptionById

      int removeSubscriptionById(long id)
      Remove subscription using id
    • removeAllSubscriptionsByContextKey

      @Modifying @Query("delete from IncrementalSyncSubscriptionEntity s where s.contextKey= ?1") int removeAllSubscriptionsByContextKey(String contextKey)
      Remove all subscription belong to a context key
    • removeExpiredSubscriptions

      @Modifying @Query("delete from IncrementalSyncSubscriptionEntity s where s.contextKey=?1 and s.lastAccessTime < ?2") int removeExpiredSubscriptions(String contextKey, Instant ttl)
      Remove expired subscription belong to a context key
    • removeSubscriptionsByContextKeyAndState

      @Modifying @Query("delete from IncrementalSyncSubscriptionEntity s where s.contextKey=?1 and s.state = ?2") int removeSubscriptionsByContextKeyAndState(String contextKey, String state)
      Remove deleted subscription belong to a context key and state
    • removeSubscriptionsByContextKeyAndState

      default int removeSubscriptionsByContextKeyAndState(String contextKey, IncrementalSyncState state)
      Remove deleted subscription belong to a context key and state
    • removeDeletedSubscriptions

      default int removeDeletedSubscriptions(String contextKey)
      Remove deleted subscription belong to a context key