001/*
002 * Stallion Core: A Modern Web Framework
003 *
004 * Copyright (C) 2015 - 2016 Stallion Software LLC.
005 *
006 * This program is free software: you can redistribute it and/or modify it under the terms of the
007 * GNU General Public License as published by the Free Software Foundation, either version 2 of
008 * the License, or (at your option) any later version. This program is distributed in the hope that
009 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
011 * License for more details. You should have received a copy of the GNU General Public License
012 * along with this program.  If not, see <http://www.gnu.org/licenses/gpl-2.0.html>.
013 *
014 *
015 *
016 */
017
018package io.stallion.jobs;
019
020
021public class JobHealthInfo {
022    private String jobName;
023
024    private long lastStartedAt;
025    private long lastFinishedAt;
026    private long lastFailedAt;
027    private long lastRunTime;
028    private boolean isRunningNow;
029    private String error;
030    private boolean lastRunSucceeded;
031    private long expectCompleteBy;
032    private int failCount = 0;
033    private String nextExecuteMinuteStamp = "";
034
035
036    public long getLastStartedAt() {
037        return lastStartedAt;
038    }
039
040    public void setLastStartedAt(long lastStartedAt) {
041        this.lastStartedAt = lastStartedAt;
042    }
043
044    public long getLastFinishedAt() {
045        return lastFinishedAt;
046    }
047
048    public void setLastFinishedAt(long lastFinishedAt) {
049        this.lastFinishedAt = lastFinishedAt;
050    }
051
052    public long getLastRunTime() {
053        return lastRunTime;
054    }
055
056    public void setLastRunTime(long lastRunTime) {
057        this.lastRunTime = lastRunTime;
058    }
059
060    public boolean isRunningNow() {
061        return isRunningNow;
062    }
063
064    public void setRunningNow(boolean isRunningNow) {
065        this.isRunningNow = isRunningNow;
066    }
067
068    public String getError() {
069        return error;
070    }
071
072    public void setError(String error) {
073        this.error = error;
074    }
075
076    public boolean isLastRunSucceeded() {
077        return lastRunSucceeded;
078    }
079
080    public void setLastRunSucceeded(boolean lastRunSucceeded) {
081        this.lastRunSucceeded = lastRunSucceeded;
082    }
083
084    public long getExpectCompleteBy() {
085        return expectCompleteBy;
086    }
087
088    public void setExpectCompleteBy(long expectCompleteBy) {
089        this.expectCompleteBy = expectCompleteBy;
090    }
091
092    public String getJobName() {
093        return jobName;
094    }
095
096    public void setJobName(String jobName) {
097        this.jobName = jobName;
098    }
099
100    public long getLastFailedAt() {
101        return lastFailedAt;
102    }
103
104    public JobHealthInfo setLastFailedAt(long lastFailedAt) {
105        this.lastFailedAt = lastFailedAt;
106        return this;
107    }
108
109    public int getFailCount() {
110        return failCount;
111    }
112
113    public JobHealthInfo setFailCount(int failCount) {
114        this.failCount = failCount;
115        return this;
116    }
117
118
119    public String getNextExecuteMinuteStamp() {
120        return nextExecuteMinuteStamp;
121    }
122
123    public JobHealthInfo setNextExecuteMinuteStamp(String nextExecuteMinuteStamp) {
124        this.nextExecuteMinuteStamp = nextExecuteMinuteStamp;
125        return this;
126    }
127}