All Downloads are FREE. Search and download functionalities are using the official Maven repository.

no.unit.nva.auth.CachedValueProvider Maven / Gradle / Ivy

The newest version!
package no.unit.nva.auth;

public abstract class CachedValueProvider {

    protected T cachedValue;

    public T getValue() {
        if (cachedValue == null || isExpired()) {
            cachedValue = getNewValue();
        }
        return cachedValue;
    }

    protected abstract boolean isExpired();

    protected abstract T getNewValue();
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy