Examples of CacheService


Examples of org.exoplatform.services.cache.CacheService

      config.setName(param.getName());
      config.setImplementation("java.lang.String");
      param.setObject(config);
      params.addParameter(param);

      CacheService cs = new CacheServiceImpl(params, new MyExoCacheFactory());
      assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("NoImpl").getClass(),
         cs.getCacheInstance("NoImpl") instanceof MyExoCache);
      assertTrue("Expected type ConcurrentFIFOExoCache found " + cs.getCacheInstance("KnownImpl").getClass(),
         cs.getCacheInstance("KnownImpl") instanceof ConcurrentFIFOExoCache);
      assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("UnKnownImpl").getClass(),
         cs.getCacheInstance("UnKnownImpl") instanceof MyExoCache);
      assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("UnKnownImplButCorrectFQN").getClass(),
         cs.getCacheInstance("UnKnownImplButCorrectFQN") instanceof MyExoCache);
      assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("NoImpl-MyExoCacheConfig").getClass(),
         cs.getCacheInstance("NoImpl-MyExoCacheConfig") instanceof MyExoCache);
      assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("KnownImpl-MyExoCacheConfig").getClass(),
         cs.getCacheInstance("KnownImpl-MyExoCacheConfig") instanceof MyExoCache);
      assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("UnKnownImpl-MyExoCacheConfig").getClass(),
         cs.getCacheInstance("UnKnownImpl-MyExoCacheConfig") instanceof MyExoCache);
      assertTrue("Expected type MyExoCache found "
         + cs.getCacheInstance("UnKnownImplButCorrectFQN-MyExoCacheConfig").getClass(),
         cs.getCacheInstance("UnKnownImplButCorrectFQN-MyExoCacheConfig") instanceof MyExoCache);
   }
View Full Code Here

Examples of org.geomajas.plugin.caching.service.CacheService

  }

  private Map<CacheCategory, CacheService> createCaches(CacheInfo cacheInfo) {
    Map<CacheCategory, CacheService> ciCaches = new HashMap<CacheCategory, CacheService>();
    for (Map.Entry<CacheCategory, InfinispanConfiguration> entry : cacheInfo.getConfiguration().entrySet()) {
      CacheService cacheService;
      CacheCategory category = entry.getKey();
      InfinispanConfiguration config = entry.getValue();
      if (config.isCacheEnabled()) {
        String configurationName = config.getConfigurationName();
        if (null == configurationName) {
View Full Code Here

Examples of org.geomajas.plugin.caching.service.CacheService

    return ciCaches;
  }

  public CacheService create(Layer layer, CacheCategory category) {
    CacheSelector cacheSelector = new CacheSelector(category, layer);
    CacheService cacheService;
    cacheService = caches.get(cacheSelector);
    if (null == cacheService) {
      cacheSelector = new CacheSelector(category, null);
      cacheService = caches.get(cacheSelector);
    }
View Full Code Here

Examples of org.jahia.services.cache.CacheService

        } else if (request.getParameter ("flushHibernateCaches") != null) {
            CacheHelper.flushHibernateCaches();
        }

        // get the cache factory instance
        CacheService cacheFactory = ServicesRegistry.getInstance().getCacheService();

        // get the registered cache names
        Iterator cacheNameIte = cacheFactory.getNames ().iterator();

        // for each cache..
        while (cacheNameIte.hasNext()) {

            // get the cache name
View Full Code Here

Examples of org.rssowl.ui.internal.CacheService

  List<ITask> getSavedSearchServiceTestTasks(final List<Exception> ex) {
    List<ITask> tasks = new ArrayList<ITask>();

    /* Create Services */
    final CacheService cacheService = new CacheService();

    /* Create Saved Searches */
    createSavedSearches();

    /* Save some Feeds first */
    saveFeedsHelper();

    final SavedSearchService smService = new SavedSearchService();

    tasks.add(new TaskAdapter() {
      public IStatus run(IProgressMonitor monitor) {
        try {
          smService.updateSavedSearches(cacheService.getSearchMarks());
          smService.stopService();
        } catch (Exception e) {
          ex.add(e);
        }
        return Status.OK_STATUS;
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.