class ExpiringCache {

    public synchronized @Nullable V getValue() {
        V cachedValue = value.get();
        if (cachedValue == null || isExpired()) {
            return refreshValue();
        }
        return cachedValue;
    }

    public  ExpiringCache(Duration expiry, Supplier<@Nullable V> action);
    public  ExpiringCache(long expiry, Supplier<@Nullable V> action);

}