addOrNull

fun addOrNull(replica: ReplicaId, value: Double): Patch<DDSketch>?

add, or null when replica's slot in the bucket, or in the zero or overflow counter, is already at Long.MAX_VALUE.

For a caller that has to refuse a whole batch before applying any of it, such as a metric exporter: it asks first, rather than catching an exception part-way (#3354).

Throws

if value is NaN or infinite.