Package org.opennms.netmgt.flows.elastic
Class SmartQueryService
- java.lang.Object
-
- org.opennms.netmgt.flows.elastic.SmartQueryService
-
- All Implemented Interfaces:
FlowQueryService
public class SmartQueryService extends Object implements FlowQueryService
Used to intelligently delegate to the properFlowQueryService
based on whether or not aggregated flows can be used.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SmartQueryService.QueryServiceType
-
Constructor Summary
Constructors Constructor Description SmartQueryService(com.codahale.metrics.MetricRegistry metricRegistry, FlowQueryService rawQueryService, FlowQueryService aggQueryService)
-
Method Summary
-
-
-
Constructor Detail
-
SmartQueryService
public SmartQueryService(com.codahale.metrics.MetricRegistry metricRegistry, FlowQueryService rawQueryService, FlowQueryService aggQueryService)
-
-
Method Detail
-
getFlowCount
public CompletableFuture<Long> getFlowCount(List<Filter> filters)
- Specified by:
getFlowCount
in interfaceFlowQueryService
-
getApplications
public CompletableFuture<List<String>> getApplications(String matchingPrefix, long limit, List<Filter> filters)
- Specified by:
getApplications
in interfaceFlowQueryService
-
getTopNApplicationSummaries
public CompletableFuture<List<TrafficSummary<String>>> getTopNApplicationSummaries(int N, boolean includeOther, List<Filter> filters)
- Specified by:
getTopNApplicationSummaries
in interfaceFlowQueryService
-
getApplicationSummaries
public CompletableFuture<List<TrafficSummary<String>>> getApplicationSummaries(Set<String> applications, boolean includeOther, List<Filter> filters)
- Specified by:
getApplicationSummaries
in interfaceFlowQueryService
-
getApplicationSeries
public CompletableFuture<com.google.common.collect.Table<Directional<String>,Long,Double>> getApplicationSeries(Set<String> applications, long step, boolean includeOther, List<Filter> filters)
- Specified by:
getApplicationSeries
in interfaceFlowQueryService
-
getTopNApplicationSeries
public CompletableFuture<com.google.common.collect.Table<Directional<String>,Long,Double>> getTopNApplicationSeries(int N, long step, boolean includeOther, List<Filter> filters)
- Specified by:
getTopNApplicationSeries
in interfaceFlowQueryService
-
getConversations
public CompletableFuture<List<String>> getConversations(String locationPattern, String protocolPattern, String lowerIPPattern, String upperIPPattern, String applicationPattern, long limit, List<Filter> filters)
- Specified by:
getConversations
in interfaceFlowQueryService
-
getTopNConversationSummaries
public CompletableFuture<List<TrafficSummary<Conversation>>> getTopNConversationSummaries(int N, boolean includeOther, List<Filter> filters)
- Specified by:
getTopNConversationSummaries
in interfaceFlowQueryService
-
getConversationSummaries
public CompletableFuture<List<TrafficSummary<Conversation>>> getConversationSummaries(Set<String> conversations, boolean includeOther, List<Filter> filters)
- Specified by:
getConversationSummaries
in interfaceFlowQueryService
-
getConversationSeries
public CompletableFuture<com.google.common.collect.Table<Directional<Conversation>,Long,Double>> getConversationSeries(Set<String> conversations, long step, boolean includeOther, List<Filter> filters)
- Specified by:
getConversationSeries
in interfaceFlowQueryService
-
getTopNConversationSeries
public CompletableFuture<com.google.common.collect.Table<Directional<Conversation>,Long,Double>> getTopNConversationSeries(int N, long step, boolean includeOther, List<Filter> filters)
- Specified by:
getTopNConversationSeries
in interfaceFlowQueryService
-
getHosts
public CompletableFuture<List<String>> getHosts(String regex, long limit, List<Filter> filters)
- Specified by:
getHosts
in interfaceFlowQueryService
-
getTopNHostSummaries
public CompletableFuture<List<TrafficSummary<Host>>> getTopNHostSummaries(int N, boolean includeOther, List<Filter> filters)
- Specified by:
getTopNHostSummaries
in interfaceFlowQueryService
-
getHostSummaries
public CompletableFuture<List<TrafficSummary<Host>>> getHostSummaries(Set<String> hosts, boolean includeOther, List<Filter> filters)
- Specified by:
getHostSummaries
in interfaceFlowQueryService
-
getHostSeries
public CompletableFuture<com.google.common.collect.Table<Directional<Host>,Long,Double>> getHostSeries(Set<String> hosts, long step, boolean includeOther, List<Filter> filters)
- Specified by:
getHostSeries
in interfaceFlowQueryService
-
getTopNHostSeries
public CompletableFuture<com.google.common.collect.Table<Directional<Host>,Long,Double>> getTopNHostSeries(int N, long step, boolean includeOther, List<Filter> filters)
- Specified by:
getTopNHostSeries
in interfaceFlowQueryService
-
getFieldValues
public CompletableFuture<List<String>> getFieldValues(LimitedCardinalityField field, List<Filter> filters)
- Specified by:
getFieldValues
in interfaceFlowQueryService
-
getFieldSummaries
public CompletableFuture<List<TrafficSummary<String>>> getFieldSummaries(LimitedCardinalityField field, List<Filter> filters)
- Specified by:
getFieldSummaries
in interfaceFlowQueryService
-
getFieldSeries
public CompletableFuture<com.google.common.collect.Table<Directional<String>,Long,Double>> getFieldSeries(LimitedCardinalityField field, long step, List<Filter> filters)
- Specified by:
getFieldSeries
in interfaceFlowQueryService
-
isAlwaysUseAggForQueries
public boolean isAlwaysUseAggForQueries()
-
setAlwaysUseAggForQueries
public void setAlwaysUseAggForQueries(boolean alwaysUseAggForQueries)
-
isAlwaysUseRawForQueries
public boolean isAlwaysUseRawForQueries()
-
setAlwaysUseRawForQueries
public void setAlwaysUseRawForQueries(boolean alwaysUseRawForQueries)
-
getTimeRangeDurationAggregateThresholdMs
public long getTimeRangeDurationAggregateThresholdMs()
-
setTimeRangeDurationAggregateThresholdMs
public void setTimeRangeDurationAggregateThresholdMs(long timeRangeDurationAggregateThresholdMs)
-
getTimeRangeEndpointAggregateThresholdMs
public long getTimeRangeEndpointAggregateThresholdMs()
-
setTimeRangeEndpointAggregateThresholdMs
public void setTimeRangeEndpointAggregateThresholdMs(long timeRangeEndpointAggregateThresholdMs)
-
-