/** * Returns the unique search identifier (SID) for this job. * * @return The job's SID. */ public String getSid() { return getString("sid"); }
/** * Returns the latest time in the time range to search. * @see #getEarliestTime * @see #getCursorTime * @see #getDoneProgress * * @return The latest search time, in epoch format. */ public String getSearchLatestTime() { checkReady(); return getString("searchLatestTime", null); }
/** * Returns the subset of the entire search that is before any transforming * commands. The original search should be the "eventSearch" + * "reportSearch". * @see #getReportSearch * @return The event search query. */ public String getEventSearch() { checkReady(); return getString("eventSearch", null); }
/** * Returns a value that indicates how jobs were started (such as the * scheduler). * * @return The delegate, or {@code null} if not specified. */ public String getDelegate() { checkReady(); return getString("delegate", null); }
/** * Returns a value that indicates how events are sorted. * * @return "asc" if events are sorted in time order (oldest first), * "desc" if events are sorted in inverse time order (latest first), * or "none" if events are not sorted. */ public String getEventSorting() { checkReady(); return getString("eventSorting"); }
/** * Returns the dispatch state for this job. <br> * Valid values are: QUEUED, PARSING, RUNNING, PAUSED, FINALIZING, FAILED, * or DONE. * * @return This job's dispatch state. */ public String getDispatchState() { checkReady(); return getString("dispatchState"); }
/** * Returns all positive keywords used by this job. A positive keyword is * a keyword that is not in a NOT clause. * * @return The search job keywords. */ public String getKeywords() { checkReady(); return getString("keywords", null); }
/** * Returns the search string that is sent to every search peer for this job. * * @return The remote search query string. */ public String getRemoteSearch() { checkReady(); return getString("remoteSearch", null); }
/** * Returns the reporting subset of this search, which is the streaming part * of the search that is send to remote providers if reporting commands are * used. The original search should be the "eventSearch" + "reportSearch". * @see #getEventSearch * * @return The reporting search query. */ public String getReportSearch() { checkReady(); return getString("reportSearch", null); }
/** * Returns this job's label. * * @return The search job label. */ public String getLabel() { checkReady(); return getString("label", null); }
/** * Returns the earliest time in the time range to search. * @see #getLatestTime * @see #getCursorTime * @see #getDoneProgress * * @return This earliest search time, in epoch format. */ public String getSearchEarliestTime() { checkReady(); return getString("searchEarliestTime", null); }
/** * Refreshes this job. * * @return The search job. */ @Override public Job refresh() { update(); ResponseMessage response = service.get(path); if (response.getStatus() == 204) { isReady = false; return this; } AtomEntry entry; try { entry = AtomEntry.parseStream(response.getContent()); } catch (Exception e) { throw new RuntimeException(e); } load(entry); if (getString("dispatchState").equals("QUEUED") || getString("dispatchState").equals("PARSING")) { isReady = false; } else { isReady = true; } return this; }