cz.jalasoft.lifeconfig.reader.ReloadingConfigReader Maven / Gradle / Ivy
package cz.jalasoft.lifeconfig.reader;
import cz.jalasoft.lifeconfig.converterprovider.ConverterNotFoundException;
import cz.jalasoft.lifeconfig.converter.ConverterException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.Optional;
/**
* @author Honza Lastovicka ([email protected])
* @since 2016-09-20.
*/
public final class ReloadingConfigReader implements ConfigReader {
private final ConfigReader decorated;
private final LastModifiedMillisProvider lastModifiedMillisSuplier;
private final boolean isReloading;
private Long actualLastUpdateMillis;
public ReloadingConfigReader(ConfigReader decorated, LastModifiedMillisProvider lasUpdateMillisSupplier, boolean isReloading) {
this.decorated = decorated;
this.lastModifiedMillisSuplier = lasUpdateMillisSupplier;
this.isReloading = isReloading;
}
@Override
public Optional