com.splunk
Class JobEventsArgs

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<java.lang.String,java.lang.Object>
              extended by com.splunk.Args
                  extended by com.splunk.JobEventsArgs
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>

public class JobEventsArgs
extends Args

The JobEventsArgs class contains arguments for getting events using the Job.getEvents() method.

See Also:
Serialized Form

Nested Class Summary
static class JobEventsArgs.OutputMode
          Specifies the format for the returned output.
static class JobEventsArgs.TruncationMode
          Specifies how to truncate lines to achieve the value in setMaximumLines(int).
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
JobEventsArgs()
          Class constructor.
 
Method Summary
 void setCount(int count)
          Sets the maximum number of results to return.
 void setEarliestTime(java.lang.String earliestTime)
          Specifies the earliest time in the time range to search.
 void setFieldList(java.lang.String[] fieldList)
          Sets a list of fields to return for the event set.
 void setLatestTime(java.lang.String latestTime)
          Specifies the latest time in the time range to search.
 void setMaximumLines(int maximumLines)
          Sets the maximum number of lines that any single event's _raw field should contain.
 void setOffset(int offset)
          Specifies the index of the first result (inclusive) from which to begin returning data.
 void setOutputMode(JobEventsArgs.OutputMode outputMode)
          Sets the format of the output.
 void setOutputTimeFormat(java.lang.String outputTimeFormat)
          Sets a UTC time format.
 void setSearch(java.lang.String search)
          Sets the post-processing search to apply to results.
 void setSegmentation(java.lang.String segmentation)
          Sets the type of segmentation to perform on the data, including an option to perform k/v segmentation.
 void setTimeFormat(java.lang.String timeFormat)
          Specifies an expression to convert a formatted time string from {start,end}_time into UTC seconds.
 void setTruncationMode(JobEventsArgs.TruncationMode truncationMode)
          Specifies how to truncate lines to achieve the value in setMaximumLines(int).
 
Methods inherited from class com.splunk.Args
add, create, create, create, encode, encode, encode, get
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get, removeEldestEntry
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, entrySet, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

JobEventsArgs

public JobEventsArgs()
Class constructor.

Method Detail

setCount

public void setCount(int count)
Sets the maximum number of results to return. To return all available results, specify 0. The default value is 100.

Parameters:
count - The maximum number of results.

setEarliestTime

public void setEarliestTime(java.lang.String earliestTime)
Specifies the earliest time in the time range to search. The time string can be a UTC time (with fractional seconds), a relative time specifier (to now), or a formatted time string.

Parameters:
earliestTime - The earliest time.

setFieldList

public void setFieldList(java.lang.String[] fieldList)
Sets a list of fields to return for the event set.

Parameters:
fieldList - A list of fields.

setLatestTime

public void setLatestTime(java.lang.String latestTime)
Specifies the latest time in the time range to search. The time string can be a UTC time (with fractional seconds), a relative time specifier (to now), or a formatted time string.

Parameters:
latestTime - The latest time.

setMaximumLines

public void setMaximumLines(int maximumLines)
Sets the maximum number of lines that any single event's _raw field should contain.

Parameters:
maximumLines - The maximum number of lines. For no limit, specify 0.

setOffset

public void setOffset(int offset)
Specifies the index of the first result (inclusive) from which to begin returning data. This value is 0-indexed.

In Splunk 4.1+, negative offsets are allowed and are added to the count to compute the absolute offset (for example, offset=-1 is the last available offset). Offsets in the results are always absolute and never negative. The default value is 0.

Parameters:
offset - The index of the first result to return.

setOutputMode

public void setOutputMode(JobEventsArgs.OutputMode outputMode)
Sets the format of the output.

Parameters:
outputMode - The output format.

setOutputTimeFormat

public void setOutputTimeFormat(java.lang.String outputTimeFormat)
Sets a UTC time format.

Parameters:
outputTimeFormat - A UTC time format.

setSearch

public void setSearch(java.lang.String search)
Sets the post-processing search to apply to results.

Parameters:
search - The post-processing search query.

setSegmentation

public void setSegmentation(java.lang.String segmentation)
Sets the type of segmentation to perform on the data, including an option to perform k/v segmentation.

Parameters:
segmentation - The segmentation type.

setTimeFormat

public void setTimeFormat(java.lang.String timeFormat)
Specifies an expression to convert a formatted time string from {start,end}_time into UTC seconds. The default format is "%m/%d/%Y:%H:%M:%S".

Parameters:
timeFormat - The time format.

setTruncationMode

public void setTruncationMode(JobEventsArgs.TruncationMode truncationMode)
Specifies how to truncate lines to achieve the value in setMaximumLines(int).

Parameters:
truncationMode - The truncation mode.