package de.otto.edison.jobs.repository;

import de.otto.edison.jobs.domain.JobInfo;

import java.net.URI;
import java.time.OffsetDateTime;
import java.util.List;
import java.util.Optional;

public interface JobRepository {

    public List<JobInfo> findLatest(int maxCount);

    public Optional<JobInfo> findOne(URI uri);

    public List<JobInfo> findLatestBy(String type, int maxCount);

    public List<JobInfo> findRunningWithoutUpdateSince(OffsetDateTime timeOffset);

    public List<JobInfo> findAll();

    public List<JobInfo> findByType(String jobType);

    public Optional<JobInfo> findRunningJobByType(String jobType);

    public void createOrUpdate(JobInfo job);

    public void removeIfStopped(URI uri);

    public long size();

    JobInfo.JobStatus findStatus(URI jobUri);
}

@@ -217,31 +217,24 @@
 tory %7B%0A%0A    
-public 
 List%3CJobInfo
@@ -258,39 +258,32 @@
 maxCount);%0A%0A    
-public 
 Optional%3CJobInfo
@@ -299,39 +299,32 @@
 (URI uri);%0A%0A    
-public 
 List%3CJobInfo%3E fi
@@ -359,39 +359,32 @@
 maxCount);%0A%0A    
-public 
 List%3CJobInfo%3E fi
@@ -436,39 +436,32 @@
 meOffset);%0A%0A    
-public 
 List%3CJobInfo%3E fi
@@ -474,23 +474,16 @@
 );%0A%0A    
-public 
 List%3CJob
@@ -521,23 +521,16 @@
 );%0A%0A    
-public 
 Optional
@@ -578,31 +578,24 @@
 Type);%0A%0A    
-public 
 void createO
@@ -621,23 +621,16 @@
 );%0A%0A    
-public 
 void rem
@@ -657,23 +657,16 @@
 );%0A%0A    
-public 
 long siz

remove unnecessary code