io.deepsense.neptune.clientlibrary.models.impl.job.JobBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neptune-client-library Show documentation
Show all versions of neptune-client-library Show documentation
Enables integration with Neptune in your Java code
/**
* Copyright (c) 2016, CodiLime Inc.
*/
package io.deepsense.neptune.clientlibrary.models.impl.job;
import io.deepsense.neptune.clientlibrary.models.Job;
import io.deepsense.neptune.clientlibrary.models.JobState;
import io.deepsense.neptune.clientlibrary.services.apimodelconverter.ApiModelConverter;
import io.deepsense.neptune.clientlibrary.services.apiservice.ApiService;
import io.deepsense.neptune.clientlibrary.services.channelvaluesender.ChannelValueSendingProxy;
import java.net.URI;
import java.util.UUID;
public class JobBuilder {
private ApiService apiService;
private ApiModelConverter apiModelConverter;
private ChannelValueSendingProxy channelValueSendingProxy;
private long maxChannelValueSize;
private UUID id;
private JobState state;
private URI dumpDirUrl;
public UUID getJobId() {
return id;
}
public JobBuilder withApiService(ApiService apiService) {
this.apiService = apiService;
return this;
}
public JobBuilder withApiModelConverter(ApiModelConverter apiModelConverter) {
this.apiModelConverter = apiModelConverter;
return this;
}
public JobBuilder withChannelValueSendingProxy(ChannelValueSendingProxy channelValueSendingProxy) {
this.channelValueSendingProxy = channelValueSendingProxy;
return this;
}
public JobBuilder withMaxChannelValueSize(long maxChannelValueSize) {
this.maxChannelValueSize = maxChannelValueSize;
return this;
}
public JobBuilder withFieldsFromApi(UUID id, JobState state, URI dumpDirUrl) {
this.id = id;
this.state = state;
this.dumpDirUrl = dumpDirUrl;
return this;
}
public Job build() {
return new JobImpl(apiService, apiModelConverter, channelValueSendingProxy, maxChannelValueSize, id, state);
}
public URI getDumpDirUrl() {
return dumpDirUrl;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy