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

net.anthavio.cache.ScheduledRequest Maven / Gradle / Ivy

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