com.atlassian.jira.scheduler
Class OfBizRunDetailsDao

java.lang.Object
  extended by com.atlassian.jira.scheduler.OfBizRunDetailsDao
All Implemented Interfaces:
com.atlassian.scheduler.core.spi.RunDetailsDao

public class OfBizRunDetailsDao
extends Object
implements com.atlassian.scheduler.core.spi.RunDetailsDao

Provides persistence of job status information for atlassian-scheduler.

For now, we will try to keep at most two records per job ID: the most recent run, and if that was not successful then also the most recent run that was successful. We will tolerate duplicates by taking only the most recent run time when duplicates exist.

In the future, we may wish to keep a longer history or use some other policy for expiring the history, especially given that run-once jobs with a generated UUID would otherwise likely never be purged.

Since:
v6.2

Constructor Summary
OfBizRunDetailsDao(EntityEngine entityEngine)
           
 
Method Summary
 void addRunDetails(com.atlassian.scheduler.config.JobId jobId, com.atlassian.scheduler.status.RunDetails runDetails)
           
 List<OfBizRunDetails> getAll()
           
 com.atlassian.scheduler.status.RunDetails getLastRunForJob(com.atlassian.scheduler.config.JobId jobId)
           
 com.atlassian.scheduler.status.RunDetails getLastSuccessfulRunForJob(com.atlassian.scheduler.config.JobId jobId)
           
 void purgeHistory(Date before)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OfBizRunDetailsDao

public OfBizRunDetailsDao(EntityEngine entityEngine)
Method Detail

getLastRunForJob

@Nullable
public com.atlassian.scheduler.status.RunDetails getLastRunForJob(@Nonnull
                                                                           com.atlassian.scheduler.config.JobId jobId)
Specified by:
getLastRunForJob in interface com.atlassian.scheduler.core.spi.RunDetailsDao

getLastSuccessfulRunForJob

@Nullable
public com.atlassian.scheduler.status.RunDetails getLastSuccessfulRunForJob(@Nonnull
                                                                                     com.atlassian.scheduler.config.JobId jobId)
Specified by:
getLastSuccessfulRunForJob in interface com.atlassian.scheduler.core.spi.RunDetailsDao

addRunDetails

public void addRunDetails(@Nonnull
                          com.atlassian.scheduler.config.JobId jobId,
                          @Nonnull
                          com.atlassian.scheduler.status.RunDetails runDetails)
Specified by:
addRunDetails in interface com.atlassian.scheduler.core.spi.RunDetailsDao

getAll

public List<OfBizRunDetails> getAll()

purgeHistory

public void purgeHistory(Date before)


Copyright © 2002-2014 Atlassian. All Rights Reserved.