Java 类net.sf.ehcache.constructs.blocking.UpdatingSelfPopulatingCache 实例源码

项目:lams    文件:EhCacheFactoryBean.java   
/**
 * Predict the particular {@code Ehcache} implementation that will be returned from
 * {@link #getObject()} based on logic in {@link #createCache()} and
 * {@link #decorateCache(Ehcache)} as orchestrated by {@link #afterPropertiesSet()}.
 */
@Override
public Class<? extends Ehcache> getObjectType() {
    if (this.cache != null) {
        return this.cache.getClass();
    }
    if (this.cacheEntryFactory != null) {
        if (this.cacheEntryFactory instanceof UpdatingCacheEntryFactory) {
            return UpdatingSelfPopulatingCache.class;
        }
        else {
            return SelfPopulatingCache.class;
        }
    }
    if (this.blocking) {
        return BlockingCache.class;
    }
    return Cache.class;
}
项目:spring4-understanding    文件:EhCacheFactoryBean.java   
/**
 * Predict the particular {@code Ehcache} implementation that will be returned from
 * {@link #getObject()} based on logic in {@link #createCache()} and
 * {@link #decorateCache(Ehcache)} as orchestrated by {@link #afterPropertiesSet()}.
 */
@Override
public Class<? extends Ehcache> getObjectType() {
    if (this.cache != null) {
        return this.cache.getClass();
    }
    if (this.cacheEntryFactory != null) {
        if (this.cacheEntryFactory instanceof UpdatingCacheEntryFactory) {
            return UpdatingSelfPopulatingCache.class;
        }
        else {
            return SelfPopulatingCache.class;
        }
    }
    if (this.blocking) {
        return BlockingCache.class;
    }
    return Cache.class;
}
项目:class-guard    文件:EhCacheFactoryBean.java   
/**
 * Predict the particular {@code Ehcache} implementation that will be returned from
 * {@link #getObject()} based on logic in {@link #createCache()} and
 * {@link #decorateCache(Ehcache)} as orchestrated by {@link #afterPropertiesSet()}.
 */
public Class<? extends Ehcache> getObjectType() {
    if (this.cache != null) {
        return this.cache.getClass();
    }
    if (this.cacheEntryFactory != null) {
        if (this.cacheEntryFactory instanceof UpdatingCacheEntryFactory) {
            return UpdatingSelfPopulatingCache.class;
        }
        else {
            return SelfPopulatingCache.class;
        }
    }
    if (this.blocking) {
        return BlockingCache.class;
    }
    return Cache.class;
}
项目:lams    文件:EhCacheFactoryBean.java   
/**
 * Decorate the given Cache, if necessary.
 * @param cache the raw Cache object, based on the configuration of this FactoryBean
 * @return the (potentially decorated) cache object to be registered with the CacheManager
 */
protected Ehcache decorateCache(Ehcache cache) {
    if (this.cacheEntryFactory != null) {
        if (this.cacheEntryFactory instanceof UpdatingCacheEntryFactory) {
            return new UpdatingSelfPopulatingCache(cache, (UpdatingCacheEntryFactory) this.cacheEntryFactory);
        }
        else {
            return new SelfPopulatingCache(cache, this.cacheEntryFactory);
        }
    }
    if (this.blocking) {
        return new BlockingCache(cache);
    }
    return cache;
}
项目:spring4-understanding    文件:EhCacheFactoryBean.java   
/**
 * Decorate the given Cache, if necessary.
 * @param cache the raw Cache object, based on the configuration of this FactoryBean
 * @return the (potentially decorated) cache object to be registered with the CacheManager
 */
protected Ehcache decorateCache(Ehcache cache) {
    if (this.cacheEntryFactory != null) {
        if (this.cacheEntryFactory instanceof UpdatingCacheEntryFactory) {
            return new UpdatingSelfPopulatingCache(cache, (UpdatingCacheEntryFactory) this.cacheEntryFactory);
        }
        else {
            return new SelfPopulatingCache(cache, this.cacheEntryFactory);
        }
    }
    if (this.blocking) {
        return new BlockingCache(cache);
    }
    return cache;
}
项目:cacheonix-core    文件:EhCacheFacade.java   
/**
 * Decorate the given Cache, if necessary.
 * <p>The default implementation simply returns the given cache object as-is.
 *
 * @param cache the raw Cache object, based on the configuration of this FactoryBean
 * @param model the model containing the name of the cache to retrieve
 * @return the (potentially decorated) cache object to be registered with the CacheManager
 */
protected Ehcache decorateCache(Cache cache, EhCacheCachingModel model) {
    if (model.getCacheEntryFactory() != null) {
        if (model.getCacheEntryFactory() instanceof UpdatingCacheEntryFactory) {
            return new UpdatingSelfPopulatingCache(cache, (UpdatingCacheEntryFactory) model.getCacheEntryFactory());
        } else {
            return new SelfPopulatingCache(cache, model.getCacheEntryFactory());
        }
    }
    if (model.isBlocking()) {
        return new BlockingCache(cache);
    }
    return cache;
}
项目:class-guard    文件:EhCacheFactoryBean.java   
/**
 * Decorate the given Cache, if necessary.
 * @param cache the raw Cache object, based on the configuration of this FactoryBean
 * @return the (potentially decorated) cache object to be registered with the CacheManager
 */
protected Ehcache decorateCache(Ehcache cache) {
    if (this.cacheEntryFactory != null) {
        if (this.cacheEntryFactory instanceof UpdatingCacheEntryFactory) {
            return new UpdatingSelfPopulatingCache(cache, (UpdatingCacheEntryFactory) this.cacheEntryFactory);
        }
        else {
            return new SelfPopulatingCache(cache, this.cacheEntryFactory);
        }
    }
    if (this.blocking) {
        return new BlockingCache(cache);
    }
    return cache;
}