com.avaje.ebeaninternal.server.cache.DefaultServerCache Maven / Gradle / Ivy
package com.avaje.ebeaninternal.server.cache;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.avaje.ebean.BackgroundExecutor;
import com.avaje.ebean.EbeanServer;
import com.avaje.ebean.cache.ServerCache;
import com.avaje.ebean.cache.ServerCacheOptions;
import com.avaje.ebean.cache.ServerCacheStatistics;
/**
* The default cache implementation.
*
* It is base on ConcurrentHashMap with periodic trimming using a TimerTask.
* The periodic trimming means that an LRU list does not have to be maintained.
*
*/
public class DefaultServerCache implements ServerCache {
private static final Logger logger = Logger.getLogger(DefaultServerCache.class.getName());
private static final CacheEntryComparator comparator = new CacheEntryComparator();
private final ConcurrentHashMap
© 2015 - 2025 Weber Informatics LLC | Privacy Policy