Code example for ConcurrentSkipListMap

0
 
/** 
 * @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a> 
 */ 
public abstract class AbstractCacheEntryLookupFactory implements CacheEntryLookupFactory { 
    private Map<String, CacheEntryLookup> lookups = new ConcurrentSkipListMap<String, CacheEntryLookup>();
 
    public CacheEntryLookup createCacheEntryLookup(String cacheName, Cache cache) {
        CacheEntryLookup cel = lookups.get(cacheName);
        if (cel != null)
            return cel;
 
        CacheEntryLookup acel = doCreateCacheEntryLookup(cache);
        lookups.put(cacheName, acel);
        return acel;
    } 
 
    protected abstract CacheEntryLookup doCreateCacheEntryLookup(Cache cache);
} 
Contextual code suggestions in your IDE  Get Codota for Java