net.anotheria.anoprise.cache.RoundRobinSoftReferenceCacheFactory 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;
/**
* Factory for the RoundRobinSoftReferenceCache.
*
* @param type for the key.
* @param type for the value.
* @author lrosenberg
*/
public class RoundRobinSoftReferenceCacheFactory implements CacheFactory {
@Override
public Cache create(String name, int startSize, int maxSize) {
return new RoundRobinSoftReferenceCache(name, startSize, maxSize);
}
@Override
public ExpiringCache createExpiring(String name, int startSize, int maxSize, long expirationTime) {
Cache> underlyingCache = new RoundRobinSoftReferenceCache(name, startSize, maxSize);
return new ExpiringCache(name, expirationTime, underlyingCache);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy