/** * Checks whether the job is ready to be accessed, and throws an exception * if it is not. */ private void checkReady() { if (!isReady()) throw new SplunkException(SplunkException.JOB_NOTREADY, "Job not yet scheduled by server"); }
/** * Indicates whether the job is done. * * @return {@code true} if the job is done, {@code false} if not. */ public boolean isDone() { if (!isReady()) return false; if (!getBoolean("isDone")) { this.refresh(); } return getBoolean("isDone"); }