public interface Query
| Modifier and Type | Interface and Description |
|---|---|
static class |
Query.And
Query that matches if both sub-queries match.
|
static class |
Query.CompositeKeyQuery
Checks all of a set of conditions for the same key match the specified value.
|
static class |
Query.Equal
Query that matches if the tag map contains key
k with value v. |
static class |
Query.GreaterThan
Query that matches if the tag map contains key
k with a value that is lexically
greater than v. |
static class |
Query.GreaterThanEqual
Query that matches if the tag map contains key
k with a value that is lexically
greater than or equal to v. |
static class |
Query.Has
Query that matches if the tag map contains a specified key.
|
static class |
Query.In
Query that matches if the tag map contains key
k with a value in the set
vs. |
static class |
Query.InvertedKeyQuery
Query that matches if the underlying key query does not match.
|
static interface |
Query.KeyQuery
Base interface for simple queries that check the value associated with a single key.
|
static class |
Query.LessThan
Query that matches if the tag map contains key
k with a value that is lexically
less than v. |
static class |
Query.LessThanEqual
Query that matches if the tag map contains key
k with a value that is lexically
less than or equal to v. |
static class |
Query.Not
Query that matches if the sub-query does not match.
|
static class |
Query.Or
Query that matches if either sub-queries match.
|
static class |
Query.Regex
Query that matches if the tag map contains key
k with a value that matches the
regex in v. |
| Modifier and Type | Field and Description |
|---|---|
static Query |
FALSE
Query that never matches.
|
static Query |
TRUE
Query that always matches.
|
| Modifier and Type | Method and Description |
|---|---|
default Query |
and(Query q)
Returns a new query:
this AND q. |
default List<Query> |
andList()
Converts this query into a list of sub-queries that can be ANDd together.
|
default List<Query> |
dnfList()
Converts this query into disjunctive normal form.
|
default Map<String,String> |
exactTags()
Extract the tags from the query that have an exact match for a given value.
|
default boolean |
matches(com.netflix.spectator.api.Id id)
Check to see if this query matches an id.
|
boolean |
matches(Map<String,String> tags)
Check to see if this query matches a set of tags.
|
default Query |
not()
Returns an inverted version of this query.
|
default Query |
or(Query q)
Returns a new query:
this OR q. |
default Query |
simplify(Map<String,String> tags)
Return a new query that has been simplified by pre-evaluating the conditions for a set
of tags that are common to all metrics.
|
static Map<String,String> |
toMap(com.netflix.spectator.api.Id id)
Convert
id to a map. |
static final Query TRUE
static final Query FALSE
boolean matches(Map<String,String> tags)
tags - Tags to use when checking for a match.default boolean matches(com.netflix.spectator.api.Id id)
matches(Map)
with the result of toMap(Id).id - Id to use when checking for a match.default Map<String,String> exactTags()
Query.Equal clause.default Query not()
default List<Query> dnfList()
default List<Query> andList()