com.breuninger.boot.jobs.repository.JobRepository Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-boot-starter-breuninger-jobs Show documentation
Show all versions of spring-boot-starter-breuninger-jobs Show documentation
spring-boot-starter-breuninger-jobs
package com.breuninger.boot.jobs.repository;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Optional;
import com.breuninger.boot.jobs.domain.JobInfo;
import com.breuninger.boot.jobs.domain.JobInfo.JobStatus;
import com.breuninger.boot.jobs.domain.JobMessage;
public interface JobRepository {
Optional findOne(String jobId);
List findLatest(int maxCount);
List findLatestJobsDistinct();
List findLatestBy(String type, int maxCount);
List findRunningWithoutUpdateSince(OffsetDateTime timeOffset);
List findAll();
List findAllJobInfoWithoutMessages();
List findByType(String jobType);
JobInfo createOrUpdate(JobInfo job);
void removeIfStopped(String jobId);
JobStatus findStatus(String jobId);
void appendMessage(String jobId, JobMessage jobMessage);
void setJobStatus(String jobId, JobStatus jobStatus);
void setLastUpdate(String jobId, OffsetDateTime lastUpdate);
long size();
void deleteAll();
}