com.atlassian.scheduler.core.impl
Class MemoryRunDetailsDao

java.lang.Object
  extended by com.atlassian.scheduler.core.impl.MemoryRunDetailsDao
All Implemented Interfaces:
RunDetailsDao

public class MemoryRunDetailsDao
extends Object
implements RunDetailsDao

An implementation of the RunDetailsDao that keeps the scheduler history in memory. This implementation does not share information across nodes in the cluster or persist it across restarts, but provides an otherwise functional implementation. By default, each job's history is expired 30 days after it is last updated.

Since:
v1.0

Constructor Summary
MemoryRunDetailsDao()
           
MemoryRunDetailsDao(int daysToKeepIdleHistory)
           
 
Method Summary
 void addRunDetails(JobId jobId, RunDetails runDetails)
          Records the result of an attempt to run the specified job.
 RunDetails getLastRunForJob(JobId jobId)
          Returns the result of the most recent attempt to run this job.
 RunDetails getLastSuccessfulRunForJob(JobId jobId)
          Returns the result of the most recent successful run of this job.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryRunDetailsDao

public MemoryRunDetailsDao()

MemoryRunDetailsDao

public MemoryRunDetailsDao(int daysToKeepIdleHistory)
Method Detail

getLastRunForJob

public RunDetails getLastRunForJob(@Nonnull
                                   JobId jobId)
Description copied from interface: RunDetailsDao
Returns the result of the most recent attempt to run this job.

Specified by:
getLastRunForJob in interface RunDetailsDao
Parameters:
jobId - the job ID of interest
Returns:
the result information for the most recent run attempt, or null if there is no recorded run history for this job

getLastSuccessfulRunForJob

public RunDetails getLastSuccessfulRunForJob(@Nonnull
                                             JobId jobId)
Description copied from interface: RunDetailsDao
Returns the result of the most recent successful run of this job.

Specified by:
getLastSuccessfulRunForJob in interface RunDetailsDao
Parameters:
jobId - the job ID of interest
Returns:
the result information for the most recent run attempt, or null if there is no successful result recorded for this job

addRunDetails

public void addRunDetails(@Nonnull
                          JobId jobId,
                          @Nonnull
                          RunDetails runDetails)
Description copied from interface: RunDetailsDao
Records the result of an attempt to run the specified job.

Specified by:
addRunDetails in interface RunDetailsDao
Parameters:
jobId - the job ID of the job that the scheduler attempted to run
runDetails - the result of the run


Copyright © 2014 Atlassian. All Rights Reserved.