Package net.sf.joafip.service

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


        .createExclusiveDataAccessSession();
    session.open();
    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    final Bob1 bob1 = Bob1.newInstance(instanceFactory, true);
    bob1.setVal(10);
    session.save();
    final DataRecordIdentifier dataRecordIdentifier = filePersistence
        .getCurrentDataRecordIdentifierAssociatedToObject(bob1);
    assertNotNull("bob1 must be saved as a detached object",
        dataRecordIdentifier);
View Full Code Here


        .createExclusiveDataAccessSession();
    session.open();
    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    Bob1 bob1 = Bob1.newInstance(instanceFactory, true);
    bob1.setVal(10);
    session.save();
    final DataRecordIdentifier dataRecordIdentifier = filePersistence
        .getCurrentDataRecordIdentifierAssociatedToObject(bob1);
    assertNotNull("bob1 must be saved as a detached object",
        dataRecordIdentifier);
View Full Code Here

    SubstitutedBob bob = initialBob();
    saveDone = false;
    session.setObject(KEY, bob);
    assertSaved();
    bob = null;// NOPMD unreference
    session.save();// force bob unload
    bob = (SubstitutedBob) session.getObject(KEY);
    assertNotNull("must retrieve object", bob);

    saveDone = false;
    final BobContainer bobContainer = (BobContainer) bob.getObject1();
View Full Code Here

    }
    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
    bigList = (List<Integer>) session.getObject("myBigList"); // witchery of
    // lazy load
    // : all the
    // big list
View Full Code Here

      final int value = aValue(count);
      bigList.add(value); // this make bigList growing in memory
    }
    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
    bigList = (List<Integer>) session.getObject("myBigList"); // witchery of
    // lazy load
    // : all the
    // big list
View Full Code Here

    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

    }
    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
    bigList = (List<Integer>) session.getObject("myBigList"); // witchery of
    // lazy load
    // : all the
    // big list
View Full Code Here

    // memory
    int count = 0;
    for (final int value : bigList) {
      doSomething(value);
      if (count % 100 == 1) {
        session.save();
        final int numberOfObjectState = filePersistence
            .getNumberOfObjectState();
        System.out.println(count + " " + numberOfObjectState);// NOPMD
      }
      count++;
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.