/** * Set value as normal delta timestamp * * @param point the point * @param timestampDelta the timestamp delta */ private static void setTimeStamp(MetricProtocolBuffers.Point.Builder point, long timestampDelta) { if (safeLongToUInt(timestampDelta)) { point.setTint((int) timestampDelta); } else { point.setTlong(timestampDelta); } }
/** * Set value as a base point delta timestamp * A base point delta timestamp is a corrected timestamp to the actual timestamp. * * @param point the point * @param timestampDelta the timestamp delta */ private static void setBPTimeStamp(MetricProtocolBuffers.Point.Builder point, long timestampDelta) { if (safeLongToUInt(timestampDelta)) { point.setTintBP((int) timestampDelta); } else { point.setTlongBP(timestampDelta); } }
/** * Sets the new t for the point. Checks which t was set. * * @param builder the point builder * @param delta the new delta to set on the given point */ private static void setT(MetricProtocolBuffers.Point.Builder builder, long delta) { if (safeLongToUInt(delta)) { if (builder.hasTintBP()) { builder.setTintBP((int) delta); } if (builder.hasTint()) { builder.setTint((int) delta); } } else { if (builder.hasTlongBP()) { builder.setTlongBP(delta); } if (builder.hasTlong()) { builder.setTlong(delta); } } }