Class QueryCall

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue>>

    public class QueryCall
    extends java.lang.Object
    implements java.util.concurrent.Callable<java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue>>
    Executes a single remote query against a particular OpenTSDB server.
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryCall​(OpenTsdbQueryClient queryClient, java.lang.String queryUrl, org.joda.time.Interval queryInterval)
      Creates a QueryCall.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue> call()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QueryCall

        public QueryCall​(OpenTsdbQueryClient queryClient,
                         java.lang.String queryUrl,
                         org.joda.time.Interval queryInterval)
        Creates a QueryCall.
        Parameters:
        queryClient - The client that will execute the query.
        queryUrl - The full OpenTSDB query URL.
        queryInterval - The interval that the query is intended to cover. OpenTSDB sometimes returns to many data points, so the QueryCall takes care of filtering out any data points outside of this interval.
    • Method Detail

      • call

        public java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue> call()
                                                                                 throws java.lang.Exception
        Specified by:
        call in interface java.util.concurrent.Callable<java.util.List<com.elastisys.autoscaler.core.api.types.MetricValue>>
        Throws:
        java.lang.Exception