/** * Set a job with a query ending in tscollect, usually generated by createLocalAccelerationJob on a * DataModelObject instance, as the acceleration cache for this pivot. * * @param job a Job object. */ public PivotSpecification setAccelerationJob(Job job) { setAccelerationJob(job.getSid()); return this; }
/** * Returns this job's name (its search ID). * * @return The search job name. */ @Override public String getName() { checkReady(); return getSid(); }
/** * Runs the saved search using dispatch arguments. * * @param args Dispatch arguments: <ul> * <li>"dispatch.now": A time string that is used to dispatch the search as * though the specified time were the current time.</li> * <li>"dispatch.*": Overwrites the value of the search field specified in * "*".</li> * <li>"trigger_actions": A Boolean that indicates whether to trigger alert * actions.</li> * <li>"force_dispatch": A Boolean that indicates whether to start a new * search if another instance of this search is already running.</li></ul> * @return The search job. */ public Job dispatch(Map args) throws InterruptedException { ResponseMessage response = service.post(actionPath("dispatch"), args); invalidate(); String sid = Job.getSid(response); Job job = service.getJob(sid); // if job not yet scheduled, create an empty job object if (job == null) { job = new Job(service, JobCollection.REST_PATH + "/" + sid); } return job; }