Package net.sf.ehcache.constructs.blocking

Examples of net.sf.ehcache.constructs.blocking.SelfPopulatingCache


  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);
    }
View Full Code Here


    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);
    }
View Full Code Here

    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);
    }
View Full Code Here

    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);
    }
View Full Code Here

    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);
    }
View Full Code Here

    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);
    }
View Full Code Here

    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);
    }
View Full Code Here

    private ResourcesElementsProvider resourcesElementsProvider;

    @Autowired
    public void setResourceCache(
            @Qualifier("org.jasig.portal.utils.cache.resource.CachingResourceLoader") Ehcache resourceCache) {
        this.resourceCache = new SelfPopulatingCache(resourceCache, this.entryFactory);
    }
View Full Code Here

    }

    @Autowired
    @Qualifier("org.jasig.portal.RDBMUserIdentityStore.userLockCache")
    public void setUserLockCache(Ehcache userLockCache) {
        this.userLockCache = new SelfPopulatingCache(userLockCache, new CacheEntryFactory() {

            @Override
            public Object createEntry(Object key) throws Exception {
                return new SerializableObject();
            }
View Full Code Here

        this.userViewErrors = userViewErrors;
    }

    @Autowired
    public void setUserViews(@Qualifier("org.jasig.portal.layout.dlm.FragmentActivator.userViews") Ehcache userViews) {
        this.userViews = new SelfPopulatingCache(userViews, new CacheEntryFactory() {
            @Override
            public Object createEntry(Object key) throws Exception {
                final UserViewKey userViewKey = (UserViewKey)key;
               
                //Check if there was an exception the last time a load attempt was made and re-throw
View Full Code Here

TOP

Related Classes of net.sf.ehcache.constructs.blocking.SelfPopulatingCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.