Examples of evictAll()


Examples of javax.jdo.PersistenceManager.evictAll()

        pm.currentTransaction().commit();

        logger.log(BasicLevel.INFO, "Empty Cache.");
        emps.clear();
        deps.clear();
        pm.evictAll();
       
        pm.currentTransaction().begin();
        logger.log(BasicLevel.INFO, "Find Employees.");
        Query q = pm.newQuery(Department.class);
        q.setFilter("employees.ssn.endsWith(p1)");
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

          }
        }
      }
      logger.log(BasicLevel.DEBUG, getLogPrefix() + "\tCache eviction... (size=" + cac.getCurrentSize() + ")");
      PersistenceManager pm = pmf.getPersistenceManager();
      pm.evictAll();
      pm.close();
      int cachesize = cac.getCurrentSize();
      if (cachesize > 0) {
        logger.log(BasicLevel.WARN, getLogPrefix()
                + "\tCache eviction finished, size=" + cachesize);
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

        pm.currentTransaction().commit();

        logger.log(BasicLevel.INFO, "Empty Cache.");
        persons.clear();
        adds.clear();
        pm.evictAll();
       
        pm.currentTransaction().begin();
        logger.log(BasicLevel.INFO, "Find Employees.");
        Query q = pm.newQuery(Person.class);
        q.setFilter("addresses.id1 == p1");
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

        pm.currentTransaction().commit();

        logger.log(BasicLevel.INFO, "Empty Cache.");
        emps.clear();
        deps.clear();
        pm.evictAll();
       
        pm.currentTransaction().begin();
        logger.log(BasicLevel.INFO, "Find Employees.");
        Query q = pm.newQuery(Employee.class);
        q.setFilter("department.name == p1");
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

      BasicA ba = new BasicA();
      ba.writeF1("testBigExtent_" + NBOBJ);
      pm.makePersistent(ba);
    }
    pm.currentTransaction().commit();
    pm.evictAll();
    pm.close();
  }

  public void test1CreateObjects1000() {
    testCreateObjects(1000);
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

  }

  public void test2BigExtent() {
    logger.log(BasicLevel.WARN, "Using the extent ...");
    PersistenceManager pm = pmf.getPersistenceManager();
    pm.evictAll();
    long t = Calendar.getInstance().getTimeInMillis();
    Extent e = pm.getExtent(BasicA.class, false);
    Iterator it = e.iterator();
    int i= 0;
    while(it.hasNext()) {
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

        int count = ((Long) q2.execute(usernames)).intValue();
        c = (Collection) q.execute(usernames);
        int s = c.size();
        q.closeAll();
        q2.closeAll();
        pm.evictAll();
       
        assertEquals("Bad count result", 3, count);
        assertEquals("Bad result size", 3, s);
       
        pm.currentTransaction().begin();
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

        pm.currentTransaction().begin();
        pm.makePersistentAll(as);
        pm.currentTransaction().commit();
       
        as = null;
        pm.evictAll();
       
        pm.currentTransaction().begin();
        Query q = pm.newQuery(Address.class);
        Collection c = (Collection) q.execute();
        assertSameCollection("Bad collection of address from the query", getData(size), c);
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

            boolean demarcateJDOTx = (performCommit
                    || ((Boolean) needTransactionArray.get(action)).booleanValue())
                    && !pm.currentTransaction().isActive();
      if (PARAMETER_EVICTALL.equalsIgnoreCase(action)) {
          logger.log(BasicLevel.INFO, "Flushing cache ...");
          pm.evictAll();
        resetPools(pm, outStr);
          return "Cache flushed !";
      }
      initPools(pm);
            PollsSynchronizations poolsSync = new PollsSynchronizations();
View Full Code Here

Examples of javax.jdo.PersistenceManager.evictAll()

  public static void initTestData(PMHolder pmHolder)
    throws JDOException, Exception {
    String str;
    PersistenceManager pm = pmHolder.getPersistenceManager();
    pm.evictAll();
    Iterator objIter = null;
    DatabaseImpl.poolOfDepartmentId.clear();
    DatabaseImpl.poolOfEmployeeId.clear();
    DatabaseImpl.poolOfProjectId.clear();
    // remove all employee
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.