Skip to content

Commit

Permalink
Remove deprecated method newLongTaskTimer(Id) on MeterRegistry
Browse files Browse the repository at this point in the history
Closes gh-3015
  • Loading branch information
shakuzen committed Feb 10, 2022
1 parent 6a3f970 commit 852991d
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,6 @@ protected MeterRegistry(Clock clock) {
*/
protected abstract Counter newCounter(Meter.Id id);

/**
* Build a new long task timer to be added to the registry. This is guaranteed to only be called if the long task timer doesn't already exist.
*
* @param id The id that uniquely identifies the long task timer.
* @return A new long task timer.
* @deprecated Implement {@link #newLongTaskTimer(Meter.Id, DistributionStatisticConfig)} instead.
*/
@SuppressWarnings("DeprecatedIsStillUsed")
@Deprecated
protected LongTaskTimer newLongTaskTimer(Meter.Id id) {
throw new UnsupportedOperationException("MeterRegistry implementations may still override this, but it is only " +
"invoked by the overloaded form of newLongTaskTimer for backwards compatibility.");
}

/**
* Build a new long task timer to be added to the registry. This is guaranteed to only be called if the long task timer doesn't already exist.
*
Expand All @@ -187,9 +173,7 @@ protected LongTaskTimer newLongTaskTimer(Meter.Id id) {
* @return A new long task timer.
* @since 1.5.0
*/
protected LongTaskTimer newLongTaskTimer(Meter.Id id, DistributionStatisticConfig distributionStatisticConfig) {
return newLongTaskTimer(id); // default implementation for backwards compatibility
}
protected abstract LongTaskTimer newLongTaskTimer(Meter.Id id, DistributionStatisticConfig distributionStatisticConfig);

/**
* Build a new timer to be added to the registry. This is guaranteed to only be called if the timer doesn't already exist.
Expand Down

0 comments on commit 852991d

Please sign in to comment.