
org.hawkular.metrics.scheduler.impl.JobDetailsImpl Maven / Gradle / Ivy
/*
* Copyright 2014-2017 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.hawkular.metrics.scheduler.impl;
import java.util.Map;
import java.util.Objects;
import java.util.UUID;
import java.util.function.Function;
import org.hawkular.metrics.scheduler.api.JobDetails;
import org.hawkular.metrics.scheduler.api.JobParameters;
import org.hawkular.metrics.scheduler.api.JobStatus;
import org.hawkular.metrics.scheduler.api.Trigger;
import com.google.common.base.MoreObjects;
import rx.Completable;
/**
* @author jsanda
*/
public class JobDetailsImpl implements JobDetails {
private UUID jobId;
private String jobType;
private String jobName;
private JobParametersImpl parameters;
private Trigger trigger;
private JobStatus status;
public JobDetailsImpl(UUID jobId, String jobType, String jobName, JobParametersImpl parameters, Trigger trigger) {
this.jobId = jobId;
this.jobType = jobType;
this.jobName = jobName;
this.parameters = parameters;
this.trigger = trigger;
status = JobStatus.NONE;
}
public JobDetailsImpl(UUID jobId, String jobType, String jobName, JobParametersImpl parameters, Trigger trigger,
JobStatus status) {
this.jobId = jobId;
this.jobType = jobType;
this.jobName = jobName;
this.parameters = parameters;
this.trigger = trigger;
this.status = status;
}
public JobDetailsImpl(JobDetailsImpl details, Trigger newTrigger) {
jobId = details.jobId;
jobType = details.jobType;
jobName = details.jobName;
parameters = details.parameters;
status = details.status;
trigger = newTrigger;
}
@Override
public UUID getJobId() {
return jobId;
}
@Override
public String getJobType() {
return jobType;
}
@Override
public String getJobName() {
return jobName;
}
@Override
public JobParameters getParameters() {
return parameters;
}
public void setSaveParameters(Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy