Package net.sf.ehcache.constructs.blocking

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


    try {
      CacheManager cm = (CacheManager) cacheManagerFb.getObject();
      EhCacheFactoryBean cacheFb = new EhCacheFactoryBean();
      cacheFb.setCacheManager(cm);
      cacheFb.setCacheName("myCache1");
      cacheFb.setCacheEntryFactory(new CacheEntryFactory() {
        public Object createEntry(Object key) throws Exception {
          return key;
        }
      });
      cacheFb.afterPropertiesSet();
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

    public void setCachePermissions(boolean cachePermissions) {
        this.cachePermissions = cachePermissions;
    }
    @Autowired
    public void setPrincipalCache(@Qualifier(CacheFactory.PRINCIPAL_CACHEEhcache principalCache) {
        this.principalCache = new SelfPopulatingCache(principalCache, new CacheEntryFactory() {
            @Override
            public Object createEntry(Object key) throws Exception {
                final Tuple<String, Class> principalKey = (Tuple<String, Class>)key;
                return primNewPrincipal(principalKey.first, principalKey.second);
            }
View Full Code Here

    try {
      CacheManager cm = cacheManagerFb.getObject();
      EhCacheFactoryBean cacheFb = new EhCacheFactoryBean();
      cacheFb.setCacheManager(cm);
      cacheFb.setCacheName("myCache1");
      cacheFb.setCacheEntryFactory(new CacheEntryFactory() {
        @Override
        public Object createEntry(Object key) throws Exception {
          return key;
        }
      });
View Full Code Here

  private final net.sf.ehcache.constructs.blocking.SelfPopulatingCache self;
  private final EntryCreator<K, V> creator;

  PopulatingCache(Ehcache s, EntryCreator<K, V> entryCreator) {
    creator = entryCreator;
    final CacheEntryFactory f = new CacheEntryFactory() {
      @SuppressWarnings("unchecked")
      @Override
      public Object createEntry(Object key) throws Exception {
        return creator.createEntry((K) key);
      }
View Full Code Here

TOP

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

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.