Examples of createCache()


Examples of org.ajax4jsf.cache.CacheFactory.createCache()

      // servletContext, cacheProperties);
      try {
        CacheManager cacheManager = CacheManager.getInstance();
        Map env = new ServletContextInitMap(servletContext);
        CacheFactory cacheFactory = cacheManager.getCacheFactory(env);
        this.cache = cacheFactory.createCache(env, this, this);
      } catch (CacheException e) {
        throw new FacesException(e.getMessage(), e);
      }
    }
    // Create Resource-specific Faces Lifecycle instance.
View Full Code Here

Examples of org.ajax4jsf.cache.CacheFactory.createCache()

    public void init(ServletContext servletContext) {
      try {
    CacheManager cacheManager = CacheManager.getInstance();
    Map env = new ServletContextInitMap(servletContext);
    CacheFactory cacheFactory = cacheManager.getCacheFactory(env);
    this.cache = cacheFactory.createCache(env, this, this);
    servletContext.setAttribute(EVENTS_MANAGER_KEY, this);
  } catch (CacheException e) {
    throw new FacesException(e.getMessage(), e);
  }
View Full Code Here

Examples of org.apache.jcs.auxiliary.AuxiliaryCacheFactory.createCache()

        log.debug( "End of parsing for '" + attrName + "'" );

        // GET CACHE FROM FACTORY WITH ATTRIBUTES
        auxAttr.setCacheName( regName );
        auxCache = auxFac.createCache( auxAttr );
        return auxCache;
    }
}
View Full Code Here

Examples of org.apache.oodt.cas.filemgr.ingest.CacheFactory.createCache()

        Class<CacheFactory> clazz = null;

        try {
            clazz = (Class<CacheFactory>) Class.forName(serviceFactory);
            factory = clazz.newInstance();
            return factory.createCache();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            LOG.log(Level.WARNING,
                    "ClassNotFoundException when loading cache factory class "
                            + serviceFactory + " Message: " + e.getMessage());
View Full Code Here

Examples of org.apache.oodt.cas.filemgr.ingest.CacheFactory.createCache()

        Class<CacheFactory> clazz = null;

        try {
            clazz = (Class<CacheFactory>) Class.forName(serviceFactory);
            factory = clazz.newInstance();
            return factory.createCache();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            LOG.log(Level.WARNING,
                    "ClassNotFoundException when loading cache factory class "
                            + serviceFactory + " Message: " + e.getMessage());
View Full Code Here

Examples of org.apache.shindig.common.cache.CacheProvider.createCache()

  @Test
  public void getAnonCache() throws Exception {
    CacheProvider defaultProvider = new EhCacheCacheProvider(
        "res://org/apache/shindig/common/cache/ehcache/ehcacheConfig.xml", true, true);
    Cache<String, String> cache = defaultProvider.createCache(null);
    Assert.assertNotNull(cache);
    Assert.assertNull(cache.getElement("test"));
    cache.addElement("test", "value1");
    Assert.assertEquals("value1", cache.getElement("test"));
    cache.removeElement("test");
View Full Code Here

Examples of org.apache.stratum.jcs.auxiliary.behavior.IAuxiliaryCacheFactory.createCache()

        log.debug( "End of parsing for '" + attrName + "'" );

        // GET CACHE FROM FACTORY WITH ATTRIBUTES
        auxAttr.setCacheName( regName );
        auxCache = auxFac.createCache( auxAttr );
        return auxCache;
    }
}
View Full Code Here

Examples of org.jboss.cache.CacheFactory.createCache()

      Configuration config = new Configuration();
      config.setCacheMode(Configuration.CacheMode.LOCAL);
      config.setEvictionConfig(evictConfig);

      cache = factory.createCache(config, true);

      ServerCacheHitInterceptor hit = new ServerCacheHitInterceptor(this);
      ServerCacheInterceptor interceptor = new ServerCacheInterceptor(this);

      getProviderFactory().getServerPreProcessInterceptorRegistry().register(hit);
View Full Code Here

Examples of org.jboss.cache.CacheFactory.createCache()

   */
  private void registerAllJBossTreeCacheMBeans() {
      try {
        log.info("start to register all JBoss Treecache MBeans...");
        CacheFactory factory = new DefaultCacheFactory();
        Cache cache = factory.createCache("treecache.xml");
        ObjectName cacheObjectName = new ObjectName("jboss.cache:service=Cache");
        JmxRegistrationManager jmxRegistrationManager = new JmxRegistrationManager(server, cache, cacheObjectName );
        jmxRegistrationManager.registerAllMBeans();
        log.info("registered all JBoss Treecache MBeans");
      } catch (MalformedObjectNameException e) {
View Full Code Here

Examples of org.jboss.cache.CacheFactory.createCache()

      log.debug("Starting JBoss Cache");

      try
      {
         CacheFactory factory = new DefaultCacheFactory();
         cache = factory.createCache(getConfigurationAsStream());

         cache.create();
         cache.start();
      }
      catch (Exception e)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.