All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.breuninger.boot.jobs.repository.JobRepository Maven / Gradle / Ivy

There is a newer version: 2.0.5.RELEASE
Show newest version
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();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy