com.ringcentral.platform.metrics.samples.AbstractSamplesProducer Maven / Gradle / Ivy
package com.ringcentral.platform.metrics.samples;
public abstract class AbstractSamplesProducer<
S extends Sample,
SS extends SampleSpec,
ISS extends InstanceSampleSpec,
IS extends InstanceSample> implements SamplesProducer {
public void produceSamples(SS spec, ISS instanceSampleSpec, IS instanceSample) {
instanceSample.add(makeSample(spec, instanceSampleSpec, instanceSample));
}
protected abstract S makeSample(SS spec, ISS instanceSampleSpec, IS instanceSample);
}