package jenkins.python.expoint;
import hudson.Extension;
import hudson.ExtensionList;
import hudson.ExtensionPoint;
import hudson.model.Computer;
import hudson.model.Executor;
import jenkins.model.Jenkins;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import hudson.model.queue.*;
import hudson.model.queue.LoadPredictor.*;
import jenkins.python.DataConvertor;
import jenkins.python.PythonExecutor;
/**
* This class was automatically generated by the PWM tool on 2014/03/21.
* @see hudson.model.queue.LoadPredictor
*/
public abstract class LoadPredictorPW extends LoadPredictor {
private transient PythonExecutor pexec;
private void initPython() {
if (pexec == null) {
pexec = new PythonExecutor(this);
String[] jMethods = new String[0];
String[] pFuncs = new String[0];
Class[][] argTypes = new Class[0][];
pexec.checkAbstrMethods(jMethods, pFuncs, argTypes);
String[] functions = new String[2];
functions[0] = "predict";
functions[1] = "predict";
int[] argsCount = new int[2];
argsCount[0] = 4;
argsCount[1] = 3;
pexec.registerFunctions(functions, argsCount);
}
}
@Override
public Iterable<FutureLoad> predict(MappingWorksheet plan, Computer computer, long start, long end) {
initPython();
if (pexec.isImplemented(0)) {
return (Iterable) pexec.execPython("predict", plan, computer, DataConvertor.fromLong(start), DataConvertor.fromLong(end));
} else {
return super.predict(plan, computer, start, end);
}
}
@Override
public Iterable<FutureLoad> predict(Computer computer, long start, long end) {
initPython();
if (pexec.isImplemented(1)) {
return (Iterable) pexec.execPython("predict", computer, DataConvertor.fromLong(start), DataConvertor.fromLong(end));
} else {
return super.predict(computer, start, end);
}
}
public Iterable<FutureLoad> superPredict(MappingWorksheet plan, Computer computer, long start, long end) {
return super.predict(plan, computer, start, end);
}
public Iterable<FutureLoad> superPredict(Computer computer, long start, long end) {
return super.predict(computer, start, end);
}
public Object execPython(String function, Object... params) {
initPython();
return pexec.execPython(function, params);
}
public byte execPythonByte(String function, Object... params) {
initPython();
return pexec.execPythonByte(function, params);
}
public short execPythonShort(String function, Object... params) {
initPython();
return pexec.execPythonShort(function, params);
}
public char execPythonChar(String function, Object... params) {
initPython();
return pexec.execPythonChar(function, params);
}
public int execPythonInt(String function, Object... params) {
initPython();
return pexec.execPythonInt(function, params);
}
public long execPythonLong(String function, Object... params) {
initPython();
return pexec.execPythonLong(function, params);
}
public float execPythonFloat(String function, Object... params) {
initPython();
return pexec.execPythonFloat(function, params);
}
public double execPythonDouble(String function, Object... params) {
initPython();
return pexec.execPythonDouble(function, params);
}
public boolean execPythonBool(String function, Object... params) {
initPython();
return pexec.execPythonBool(function, params);
}
public void execPythonVoid(String function, Object... params) {
initPython();
pexec.execPythonVoid(function, params);
}
}