diff --git a/core/jvm/src/main/scala/cats/effect/unsafe/metrics/ComputePoolSampler.scala b/core/jvm/src/main/scala/cats/effect/unsafe/metrics/ComputePoolSampler.scala index d015150b62..d30d87c624 100644 --- a/core/jvm/src/main/scala/cats/effect/unsafe/metrics/ComputePoolSampler.scala +++ b/core/jvm/src/main/scala/cats/effect/unsafe/metrics/ComputePoolSampler.scala @@ -24,7 +24,7 @@ package metrics * @param queue * the monitored local queue */ -private[unsafe] class ComputePoolSampler(compute: WorkStealingThreadPool) +private[unsafe] final class ComputePoolSampler(compute: WorkStealingThreadPool) extends ComputePoolSamplerMBean { def getWorkerThreadCount(): Int = compute.getWorkerThreadCount() def getActiveThreadCount(): Int = compute.getActiveThreadCount() diff --git a/core/jvm/src/main/scala/cats/effect/unsafe/metrics/LocalQueueSampler.scala b/core/jvm/src/main/scala/cats/effect/unsafe/metrics/LocalQueueSampler.scala index 19985ea9c2..3abc9eb579 100644 --- a/core/jvm/src/main/scala/cats/effect/unsafe/metrics/LocalQueueSampler.scala +++ b/core/jvm/src/main/scala/cats/effect/unsafe/metrics/LocalQueueSampler.scala @@ -24,7 +24,8 @@ package metrics * @param queue * the monitored local queue */ -private[unsafe] class LocalQueueSampler(queue: LocalQueue) extends LocalQueueSamplerMBean { +private[unsafe] final class LocalQueueSampler(queue: LocalQueue) + extends LocalQueueSamplerMBean { def getFiberCount(): Int = queue.getFiberCount() def getHeadIndex(): Int = queue.getHeadIndex() def getTailIndex(): Int = queue.getTailIndex()