Package com.wavefront.predicates
Class Util
- java.lang.Object
-
- com.wavefront.predicates.Util
-
public abstract class Util extends Object
Miscellaneous utility methods used by parsers and preprocessors.- Author:
- vasily@wavefront.com.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringexpandPlaceholders(String input, ReportHistogram reportHistogram)Substitute {{...}} placeholders with corresponding components of the histogram {{metricName}} {{sourceName}} are replaced with the metric name and source respectively {{anyTagK}} is replaced with the value of the anyTagK point tagstatic StringexpandPlaceholders(String input, ReportMetric reportMetric)Substitute {{...}} placeholders with corresponding components of the point {{metricName}} {{sourceName}} are replaced with the metric name and source respectively {{anyTagK}} is replaced with the value of the anyTagK point tagstatic StringexpandPlaceholders(String input, ReportPoint reportPoint)Deprecated.static StringexpandPlaceholders(String input, Span span)Substitute {{...}} placeholders with corresponding components of a Span {{spanName}} {{sourceName}} are replaced with the span name and source respectively {{anyKey}} is replaced with the value of an annotation with anyKey keystatic longparseTextualTimeExact(String interval, long anchorTime, TimeZone timeZone)Parse a natural language time interval expression (e.g.
-
-
-
Method Detail
-
parseTextualTimeExact
public static long parseTextualTimeExact(String interval, long anchorTime, TimeZone timeZone)
Parse a natural language time interval expression (e.g. "now", "10 minutes ago", etc)- Parameters:
interval- time interval to parseanchorTime- anchor time in epoch millistimeZone- time zone- Returns:
- epoch millis
-
expandPlaceholders
@Deprecated public static String expandPlaceholders(String input, ReportPoint reportPoint)
Deprecated.Substitute {{...}} placeholders with corresponding components of the point {{metricName}} {{sourceName}} are replaced with the metric name and source respectively {{anyTagK}} is replaced with the value of the anyTagK point tag- Parameters:
input- input string with {{...}} placeholdersreportPoint- ReportPoint object to extract components from- Returns:
- string with substituted placeholders
-
expandPlaceholders
public static String expandPlaceholders(String input, ReportMetric reportMetric)
Substitute {{...}} placeholders with corresponding components of the point {{metricName}} {{sourceName}} are replaced with the metric name and source respectively {{anyTagK}} is replaced with the value of the anyTagK point tag- Parameters:
input- input string with {{...}} placeholdersreportMetric- ReportMetric object to extract components from- Returns:
- string with substituted placeholders
-
expandPlaceholders
public static String expandPlaceholders(String input, ReportHistogram reportHistogram)
Substitute {{...}} placeholders with corresponding components of the histogram {{metricName}} {{sourceName}} are replaced with the metric name and source respectively {{anyTagK}} is replaced with the value of the anyTagK point tag- Parameters:
input- input string with {{...}} placeholdersreportHistogram- ReportHistogram object to extract components from- Returns:
- string with substituted placeholders
-
expandPlaceholders
public static String expandPlaceholders(String input, Span span)
Substitute {{...}} placeholders with corresponding components of a Span {{spanName}} {{sourceName}} are replaced with the span name and source respectively {{anyKey}} is replaced with the value of an annotation with anyKey key- Parameters:
input- input string with {{...}} placeholdersspan- Span object to extract components from- Returns:
- string with substituted placeholders
-
-