com.github.lontime.extredisson.cache.ExtLocalCacheView Maven / Gradle / Ivy
The newest version!
package com.github.lontime.extredisson.cache;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;
import com.github.lontime.shaded.com.github.benmanes.caffeine.cache.Caffeine;
import com.github.lontime.shaded.org.redisson.RedissonObject;
import com.github.lontime.shaded.org.redisson.api.LocalCachedMapOptions;
import com.github.lontime.shaded.org.redisson.cache.CacheKey;
import com.github.lontime.shaded.org.redisson.cache.CacheValue;
import com.github.lontime.shaded.org.redisson.cache.LFUCacheMap;
import com.github.lontime.shaded.org.redisson.cache.LRUCacheMap;
import com.github.lontime.shaded.org.redisson.cache.LocalCacheView;
import com.github.lontime.shaded.org.redisson.cache.NoneCacheMap;
import com.github.lontime.shaded.org.redisson.cache.ReferenceCacheMap;
/**
*
* @author Nikita Koksharov
*
* @param key type
* @param value type
*/
public class ExtLocalCacheView extends LocalCacheView {
public ExtLocalCacheView(LocalCachedMapOptions, ?> options, RedissonObject object) {
super(options, object);
}
@Override
public ConcurrentMap createCache(LocalCachedMapOptions, ?> options) {
if (options.getCacheProvider() == LocalCachedMapOptions.CacheProvider.CAFFEINE) {
Caffeine