Package net.sf.joafip.service

Examples of net.sf.joafip.service.IExclusiveDataAccessSession.save()


    session.open();
    // List<Integer> bigList = new PLinkedList<Integer>(); // bigList
    // instance
    // // is in memory
    session.setObject("myBigList", new PLinkedList<Integer>());// NOPMD
    session.save();
    List<Integer> bigList = (List<Integer>) session.getObject("myBigList");
    for (int count = 0; count < max; count++) {
      final int value = aValue(count);
      bigList.add(value); // this make bigList growing in memory
      if (count % 100 == 1) {
View Full Code Here


    List<Integer> bigList = (List<Integer>) session.getObject("myBigList");
    for (int count = 0; count < max; count++) {
      final int value = aValue(count);
      bigList.add(value); // this make bigList growing in memory
      if (count % 100 == 1) {
        session.save();
        final int numberOfObjectState = filePersistence
            .getNumberOfObjectState();
        System.out.println(count + " " + numberOfObjectState);// NOPMD
      }
    }
View Full Code Here

        final int numberOfObjectState = filePersistence
            .getNumberOfObjectState();
        System.out.println(count + " " + numberOfObjectState);// NOPMD
      }
    }
    session.save();
    System.out.println("--- iterate ---");// NOPMD
    session.setObject("myBigList", bigList);
    bigList = null; // NOPMD no more reference the big list
    session.save(); // after this the garbage collector can free memory of
    // the big list
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.