
net.anthavio.cache.ScheduledRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hatatitla Show documentation
Show all versions of hatatitla Show documentation
Compact but tweakable REST client library you have been dreaming of
The newest version!
package net.anthavio.cache;
/**
*
* @author martin.vanek
*
*/
class ScheduledRequest extends CacheLoadRequest {
private long lastRefresh; //only for RefreshMode.SCHEDULED
public ScheduledRequest(CachingSettings caching, LoadingSettings loading) {
super(caching, loading);
}
protected long getHardExpire() {
return lastRefresh + (caching.getHardTtl() * 1000);
}
protected long getSoftExpire() {
return lastRefresh + (caching.getSoftTtl() * 1000);
}
protected void setLastRefresh(long lastRefresh) {
this.lastRefresh = lastRefresh;
}
public long getLastRefresh() {
return lastRefresh;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy