Skip to content

Commit

Permalink
core: make CacheValue helper class static
Browse files Browse the repository at this point in the history
Avoid reference to outer class.
  • Loading branch information
brharrington committed Sep 27, 2024
1 parent 7474caa commit 9682b27
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import com.netflix.spectator.api.Clock

class NormalizationCache(step: Long, updateF: UpdateFunction, clock: Clock = Clock.SYSTEM) {

import NormalizationCache.*

/**
* For small step sizes use a fixed two minute heartbeat as reporting can be irregular, for
* larger step size allow one sample to be missed.
Expand Down Expand Up @@ -105,5 +107,9 @@ class NormalizationCache(step: Long, updateF: UpdateFunction, clock: Clock = Clo
cacheValue.f(timestamp, value)
}

}

object NormalizationCache {

class CacheValue(var lastAccessTime: Long, val f: ValueFunction)
}

0 comments on commit 9682b27

Please sign in to comment.