Examples of clearCache()


Examples of org.apache.hadoop.hbase.io.hfile.LruBlockCache.clearCache()

  @Test
  public void testEncodedSeeker() throws IOException {
    System.err.println("Testing encoded seekers for encoding " + encoding);
    LruBlockCache cache =
      (LruBlockCache)new CacheConfig(testUtil.getConfiguration()).getBlockCache();
    cache.clearCache();
    // Need to disable default row bloom filter for this test to pass.
    HColumnDescriptor hcd = (new HColumnDescriptor(CF_NAME)).setMaxVersions(MAX_VERSIONS).
        setDataBlockEncoding(encoding).
        setBlocksize(BLOCK_SIZE).
        setBloomFilterType(BloomType.NONE);
View Full Code Here

Examples of org.apache.hadoop.hbase.io.hfile.LruBlockCache.clearCache()

  @Test
  public void testEncodedSeeker() throws IOException {
    System.err.println("Testing encoded seekers for encoding " + encoding);
    LruBlockCache cache =
      (LruBlockCache)new CacheConfig(testUtil.getConfiguration()).getBlockCache();
    cache.clearCache();
    // Need to disable default row bloom filter for this test to pass.
    HColumnDescriptor hcd = (new HColumnDescriptor(CF_NAME)).setMaxVersions(MAX_VERSIONS).
        setDataBlockEncoding(encoding).
        setEncodeOnDisk(encodeOnDisk).
        setBlocksize(BLOCK_SIZE).
View Full Code Here

Examples of org.apache.ibatis.session.SqlSession.clearCache()

      b.setId(2);
      b.setName("222");
      sqlSession.insert("insertUser", b);
      List<BatchResult> batchResults = sqlSession.flushStatements();
      batchResults.clear();
      sqlSession.clearCache();
      sqlSession.commit();
      List<User> users = sqlSession.selectList("selectUser");
      assertEquals(2, users.size());
    } finally {
      sqlSession.close();
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.clearCache()

  }

  public void testClearCache() {
    MockControl pbControl = MockControl.createControl(PersistenceBroker.class);
    final PersistenceBroker pb = (PersistenceBroker) pbControl.getMock();
    pb.clearCache();
    pbControl.setVoidCallable(1);
    pb.close();
    pbControl.setReturnValue(true, 1);
    pbControl.replay();
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.clearCache()

        Gatherer fetchedGatherer = null;
        PersistenceBroker pb = null;
        try
        {
            pb = PersistenceBrokerFactory.defaultPersistenceBroker();
            pb.clearCache();
            Criteria crit = new Criteria();
            crit.addLike("name", name);
            Query q = QueryFactory.newQuery(Gatherer.class, crit);
            fetchedGatherer = (Gatherer) pb.getObjectByQuery(q);
        }
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.clearCache()

        fetchedGatherer = null;
        pb = null;
        try
        {
            pb = PersistenceBrokerFactory.defaultPersistenceBroker();
            pb.clearCache();
            Criteria crit = new Criteria();
            crit.addLike("name", name);
            Query q = QueryFactory.newQuery(Gatherer.class, crit);
            fetchedGatherer = (Gatherer) pb.getObjectByQuery(q);
        }
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.clearCache()

            Article example = new Article();
            example.setArticleId(60);
            Identity oid = new Identity(example, ((TransactionImpl) tx).getBroker());
            // 2. lookup object by OID
            PersistenceBroker broker = ((TransactionImpl) tx).getBroker();
            broker.clearCache();
            Article b = (Article) broker.getObjectByIdentity(oid);

            assertEquals("should be same object", a, b);

            //System.out.println("now commit all changes...");
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.clearCache()

            example.setArticleId(30);
            Identity oid = new Identity(example, ((TransactionImpl) tx).getBroker());

            // 2. lookup object by OID
            PersistenceBroker broker = ((TransactionImpl) tx).getBroker();
            broker.clearCache();
            Article b = (Article) broker.getObjectByIdentity(oid);

            assertEquals("should be same object", a, b);

            //System.out.println("now commit all changes...");
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.clearCache()

        storeObjects(tx, getNewProjects("testResultsAfterTransactionWithClearedCache", 2));
        tx.commit();

        //###### hack we clear cache of PB ########
        PersistenceBroker tmp = PersistenceBrokerFactory.defaultPersistenceBroker();
        tmp.clearCache();
        tmp.close();

        int odmgZoosAfter = getDBObjectCountWithNewPB(ODMGZoo.class);
        int projectsAfter = getDBObjectCountWithNewPB(Project.class);
        int odmgZoosAfterOQL = getDBObjectCountViaOqlQueryUseNewTransaction(odmg, ODMGZoo.class);
View Full Code Here

Examples of org.apache.ojb.broker.PersistenceBroker.clearCache()

        storeObjects(tx, getNewProjects("testResultsAfterTransactionWithClearedCache", 2));
        tx.commit();

        //###### hack we clear cache of PB ########
        tmp = PersistenceBrokerFactory.defaultPersistenceBroker();
        tmp.clearCache();
        tmp.close();

        odmgZoosAfter = getDBObjectCountWithNewPB(ODMGZoo.class);
        projectsAfter = getDBObjectCountWithNewPB(Project.class);
        odmgZoosAfterOQL = getDBObjectCountViaOqlQueryUseNewTransaction(odmg, ODMGZoo.class);
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.