Search in sources :

Example 1 with JobArgs

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;
}
Also used : SplunkEvent(org.apache.camel.component.splunk.event.SplunkEvent) JobArgs(com.splunk.JobArgs) Calendar(java.util.Calendar)

Example 2 with JobArgs

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;
}
Also used : SplunkEvent(org.apache.camel.component.splunk.event.SplunkEvent) JobArgs(com.splunk.JobArgs) Calendar(java.util.Calendar)

Aggregations

JobArgs (com.splunk.JobArgs)2 Calendar (java.util.Calendar)2 SplunkEvent (org.apache.camel.component.splunk.event.SplunkEvent)2