Examples of DataCache


Examples of org.apache.openjpa.datacache.DataCache

            if (sm == null)
                return;

            sm.evict();
            if (_evictDataCache && sm.getObjectId() != null) {
                DataCache cache = _conf.getDataCacheManagerInstance().selectCache(sm);
                if (cache != null)
                    cache.remove(sm.getObjectId());
            }
        }
        catch (OpenJPAException ke) {
            throw ke;
        } catch (RuntimeException re) {
View Full Code Here

Examples of org.apache.openjpa.datacache.DataCache

    }

    public void testDataCacheOverFlow() {
        OpenJPAEntityManagerSPI em = emf.createEntityManager();
        StoreCacheImpl storeCache = (StoreCacheImpl) emf.getCache();
        DataCache cache = (DataCache) storeCache.getDelegate();
        LinkedList<CachedPerson> people = new LinkedList<CachedPerson>();

        // Persist cacheSize + 1 Entites.
        for (int i = 0; i < cacheSize + 1; i++) {
            em.getTransaction().begin();
            CachedPerson person = new CachedPerson();
            person.setId(i);
            em.persist(person);
            people.addFirst(person);
            em.getTransaction().commit();
        }

        // Assert that the first persisted entity isn't in the cache and everything else is.
        for (int i = 0; i < cacheSize + 1; i++) {
            IntId id = new IntId(CachedPerson.class, i);
            boolean contains = cache.get(id) != null;
            if (i == 0) {
                assertFalse(contains);
            } else {
                assertTrue(contains);
            }
View Full Code Here

Examples of org.exoplatform.portal.pom.config.cache.DataCache

      new UnitTest()
      {
         public void execute() throws Exception
         {
            mgr.clearCache();
            DataCache cache = mgr.getDecorator(DataCache.class);
            long readCount0 = cache.getReadCount();
            userPortalConfigSer_.getUserPortalConfig("classic", null);
            long readCount1 = cache.getReadCount();
            assertTrue(readCount1 > readCount0);
            userPortalConfigSer_.getUserPortalConfig("classic", null);
            long readCount2 = cache.getReadCount();
            assertEquals(readCount1, readCount2);
         }
      }.execute(null);
   }
View Full Code Here

Examples of org.exoplatform.portal.pom.config.cache.DataCache

      new UnitTest()
      {
         public void execute() throws Exception
         {
            mgr.clearCache();
            DataCache cache = mgr.getDecorator(DataCache.class);
            long readCount0 = cache.getReadCount();
            userPortalConfigSer_.getPage("portal::test::test1");
            long readCount1 = cache.getReadCount();
            assertTrue(readCount1 > readCount0);
            userPortalConfigSer_.getPage("portal::test::test1");
            long readCount2 = cache.getReadCount();
            assertEquals(readCount1, readCount2);
         }
      }.execute(null);
   }
View Full Code Here

Examples of org.exoplatform.portal.pom.config.cache.DataCache

      new UnitTest()
      {
         public void execute() throws Exception
         {
            mgr.clearCache();
            DataCache cache = mgr.getDecorator(DataCache.class);
            long readCount0 = cache.getReadCount();
            storage_.getPageNavigation("portal", "test");
            long readCount1 = cache.getReadCount();
            assertTrue(readCount1 > readCount0);
            storage_.getPageNavigation("portal", "test");
            long readCount2 = cache.getReadCount();
            assertEquals(readCount1, readCount2);
         }
      }.execute(null);
   }
View Full Code Here

Examples of org.exoplatform.portal.pom.config.cache.DataCache

      //
      this.repositoryService = repositoryService;
      this.manager = manager;
      this.cache = cacheService.getCacheInstance("MOPSessionManager");
      this.pomService = null;
      this.executor = new DataCache(new ExecutorDispatcher());
   }
View Full Code Here

Examples of org.exoplatform.portal.pom.config.cache.DataCache

        //
        this.repositoryService = repositoryService;
        this.manager = manager;
        this.cache = cacheService.getCacheInstance("MOPSessionManager");
        this.pomService = null;
        this.executor = new PortalNamesCache(new DataCache(new ExecutorDispatcher()));
    }
View Full Code Here

Examples of org.jitterbit.application.cache.DataCache

            factory = cacheFactories.get(clazz);
        }
        if (factory == null) {
            return null;
        }
        DataCache cache = factory.get();
        return clazz.cast(cache);
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.cache.DataCache

  {
    putValue(Action.NAME, ActionMessages.getString("ClearDataCacheAction.Text"));
    putValue(Action.SHORT_DESCRIPTION, ActionMessages.getString("ClearDataCacheAction.Description"));
    putValue(Action.MNEMONIC_KEY, ActionMessages.getOptionalMnemonic("ClearDataCacheAction.Mnemonic"));
    putValue(Action.ACCELERATOR_KEY, ActionMessages.getOptionalKeyStroke("ClearDataCacheAction.Accelerator"));
    final DataCache cache = DataCacheFactory.getCache();
    if (cache == null)
    {
      setEnabled(false);
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.cache.DataCache

    }
  }

  public void actionPerformed(final ActionEvent e)
  {
    final DataCache cache = DataCacheFactory.getCache();
    if (cache == null)
    {
      return;
    }
    final DataCacheManager cacheManager = cache.getCacheManager();
    if (cacheManager == null)
    {
      return;
    }
    cacheManager.clearAll();
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.