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

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

The newest version!
package net.anthavio.cache;

import java.util.concurrent.TimeUnit;

/**
 * 
 * @author martin.vanek
 *
 */
public interface Cache {

	public CacheEntry get(K key);

	//public CacheEntry get(CacheRequest request);

	public Boolean set(K key, V value, long duration, TimeUnit unit);

	public Boolean set(K key, CacheEntry entry);

	/**
	 * remove/delete/evict from cache by provided key
	 * 
	 * can return null is status of eviction cannot be determined
	 */
	public Boolean remove(K key);

	public void removeAll();

	public void close();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy