no.unit.nva.auth.CachedValueProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of auth Show documentation
Show all versions of auth Show documentation
A commons library for the NVA project
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