class CachedGauge implements Gauge<T> {

    @Override
    public T getValue() {
        T currentValue = this.value.get();
        if (shouldLoad() || currentValue == null) {
            T newValue = loadValue();
            if (!this.value.compareAndSet(currentValue, newValue)) {
                return this.value.get();
            }
            return newValue;
        }
        return currentValue;
    }

    protected  CachedGauge(long timeout, TimeUnit timeoutUnit);
    protected  CachedGauge(Clock clock, long timeout, TimeUnit timeoutUnit);

}