use of com.splunk.JobArgs in project camel by apache.
the class SplunkDataReader method nonBlockingSearch.
private List<SplunkEvent> nonBlockingSearch(SplunkResultProcessor callback) throws Exception {
LOG.debug("non block search start");
JobArgs queryArgs = new JobArgs();
queryArgs.setExecutionMode(ExecutionMode.NORMAL);
Calendar startTime = Calendar.getInstance();
populateArgs(queryArgs, startTime, false);
List<SplunkEvent> data = runQuery(queryArgs, false, callback);
lastSuccessfulReadTime = startTime;
return data;
}
use of com.splunk.JobArgs in project camel by apache.
the class SplunkDataReader method realtimeSearch.
private List<SplunkEvent> realtimeSearch(SplunkResultProcessor callback) throws Exception {
LOG.debug("realtime search start");
JobArgs queryArgs = new JobArgs();
queryArgs.setExecutionMode(ExecutionMode.NORMAL);
queryArgs.setSearchMode(SearchMode.REALTIME);
Calendar startTime = Calendar.getInstance();
populateArgs(queryArgs, startTime, true);
List<SplunkEvent> data = runQuery(queryArgs, true, callback);
lastSuccessfulReadTime = startTime;
return data;
}
Aggregations