public Builder(NumericBucketPoint numericBucketPoint) { this.start = numericBucketPoint.getStart(); this.end = numericBucketPoint.getEnd(); this.setMin(numericBucketPoint.getMin()); this.setAvg(numericBucketPoint.getAvg()); this.setMedian(numericBucketPoint.getMedian()); this.setMax(numericBucketPoint.getMax()); this.setSum(numericBucketPoint.getSum()); }
public String getId() { return getMetricId().getName(); }
public String getTenantId() { return getMetricId().getTenantId(); }
public Long getNotUpDuration() { if (isEmpty()) { return null; } return getAdminDuration() + getDownDuration() + getUnknownDuration(); }
public Func1<MetricId<?>, Boolean> metricTypeFilter(MetricType<?> type) { return tMetricId -> (type == null && tMetricId.getType().isUserType()) || tMetricId.getType() == type; } }
@Override public Object deserializeKey(String key, DeserializationContext ctxt) throws IOException, JsonProcessingException { return MetricType.fromTextCode(key); } }
@Override public int hashCode() { return metricId.hashCode(); } }
public AvailabilityBucketPoint build() { return new AvailabilityBucketPoint(start, end, durationMap, lastNotUptime, uptimeRatio, notUpCount, samples); } }
/** * @return The number of segments of where the availability type is not UP. A segment can combine multiple * NotUP statuses (e.g. a change from DOWN to UNKNOWN does not increment the count). */ public Long getNotUpCount() { if (isEmpty()) { return null; } return notUpCount; }
public Builder(NumericBucketPoint numericBucketPoint) { this.start = numericBucketPoint.getStart(); this.end = numericBucketPoint.getEnd(); this.setMin(numericBucketPoint.getMin()); this.setAvg(numericBucketPoint.getAvg()); this.setMedian(numericBucketPoint.getMedian()); this.setMax(numericBucketPoint.getMax()); this.setSum(numericBucketPoint.getSum()); }
public String getId() { return getMetricId().getName(); }
public String getTenantId() { return getMetricId().getTenantId(); }
public Func1<MetricId<?>, Boolean> metricTypeFilter(MetricType<?> type) { return tMetricId -> (type == null && tMetricId.getType().isUserType()) || tMetricId.getType() == type; } }
@Override public Object deserializeKey(String key, DeserializationContext ctxt) throws IOException, JsonProcessingException { return MetricType.fromTextCode(key); } }
public AvailabilityBucketPoint build() { return new AvailabilityBucketPoint(start, end, durationMap, lastNotUptime, uptimeRatio, notUpCount, samples); } }
public Long getLastNotUptime() { if (isEmpty()) { return null; } return lastNotUptime; }