Package javax.jcache

Examples of javax.jcache.Cache


   */
    public void loadCache(Collection views)throws CacheException {       
    
       try{     
            Iterator iter = views.iterator();
            Cache cache = factory.getCache();
           while(iter.hasNext()){
         CacheAccess access = null;
               RepositoryView view = (RepositoryView)iter.next();
               BeanDescriptor beanDesc = view.getBeanDescriptor();
               String region = beanDesc.getDatabaseName();
               String group = beanDesc.getRepositoryViewName();
         try{        
             factory.defineRegion(region);
         }
         catch(ObjectExistsException e){
         }
         finally{
               access = factory.getAccess(region);  
         }
         access.defineGroup(group);
                        
           }
       int size = cache.getAttributes().getMemoryCacheSize();
       logger.log(Level.INFO,Messages.format("CacheManager.size",
                       new Integer(size)));                    
       }
       catch(Exception e){
            throw new CacheException(e);
View Full Code Here

TOP

Related Classes of javax.jcache.Cache

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.