Package codes.grow.packages.graylog
Class MessageSearchOptions.Builder
java.lang.Object
codes.grow.packages.graylog.MessageSearchOptions.Builder
- Enclosing class:
MessageSearchOptions
Builder of
MessageSearchOptions.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the options (validated by the search call).Sets the end of an absolute range (default now).Limits the returned fields.Sets a Graylog keyword range such as"last five minutes".limit(int limit) Sets the page size (default 100, at most 10 000).offset(int offset) Sets how many matches to skip (pagination).Sets a relative range ending now (default 300 s when no other range is given).sort(SearchSort... sort) Sets the sort keys; later keys break ties.Sets the start of an absolute range (default end minus 300 s).Restricts the search to these stream ids.Restricts the search to these stream ids.
-
Method Details
-
range
Sets a relative range ending now (default 300 s when no other range is given).- Parameters:
range- positive duration- Returns:
- this builder
-
start
Sets the start of an absolute range (default end minus 300 s).- Parameters:
start- instant- Returns:
- this builder
-
end
Sets the end of an absolute range (default now).- Parameters:
end- instant- Returns:
- this builder
-
keyword
Sets a Graylog keyword range such as"last five minutes".- Parameters:
keyword- keyword- Returns:
- this builder
-
limit
Sets the page size (default 100, at most 10 000).- Parameters:
limit- 1..10000- Returns:
- this builder
-
offset
Sets how many matches to skip (pagination).- Parameters:
offset- non-negative offset- Returns:
- this builder
-
fields
Limits the returned fields.- Parameters:
fields- field names- Returns:
- this builder
-
sort
Sets the sort keys; later keys break ties.- Parameters:
sort- sort keys- Returns:
- this builder
-
streams
Restricts the search to these stream ids.- Parameters:
streams- stream ids- Returns:
- this builder
-
streams
Restricts the search to these stream ids.- Parameters:
streams- stream ids- Returns:
- this builder
-
build
Builds the options (validated by the search call).- Returns:
- the options
-