net.anotheria.anoprise.cache.CacheFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ano-prise Show documentation
Show all versions of ano-prise Show documentation
Collection of utils for different enterprise class projects. Among other stuff contains
Caches, Mocking, DualCrud, MetaFactory and SessionDistributorService. Visit https://opensource.anotheria.net for details.
package net.anotheria.anoprise.cache;
/**
* Defines a factory for caches.
*
* @param cache key.
* @param cache value.
* @author lrosenberg
*/
public interface CacheFactory {
/**
* Creates a new cache with given name, start and max size.
*
* @param name name of the cache.
* @param startSize start size of the cache.
* @param maxSize max size of the cache.
* @return created cache object.
*/
Cache create(String name, int startSize, int maxSize);
/**
* Creates a new expiring cache with given name, start and max size, expiration time
*
* @param name name of the cache
* @param startSize start size of the cache
* @param maxSize max size of the cache
* @param expirationTime expiration time of the cache elements
* @return created cache object
*/
ExpiringCache createExpiring(String name, int startSize, int maxSize, long expirationTime);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy