Class MeterFactory<T extends IpdMeter>

java.lang.Object
com.atlassian.diagnostics.ipd.api.meters.config.MeterFactory<T>
Type Parameters:
T - the implementation of IpdMeter that this factory creates

public final class MeterFactory<T extends IpdMeter> extends Object
Factory for creating IpdMeter instances.
Since:
5.0.0
  • Constructor Details

    • MeterFactory

      public MeterFactory(Function<MeterConfig,T> factory, String typeId, String typeSuffix)
      Parameters:
      factory - Function that creates a new instance of the meter for a given MeterConfig
      typeId - the typeId of the meter is a string value unique to the type of the meter, should be the same for compatible meters
      typeSuffix - the suffix of the type of the meter. This suffix is added at the end of the meter name when it is registered.
  • Method Details

    • createMetric

      public T createMetric(MeterConfig config)
    • typeSuffix

      public String typeSuffix()
    • getTypeId

      public String getTypeId()