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