Package net.sf.joafip.service

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


    final int maxObjectState = 2 * 100 * 1000;

    final int max = 100000;
    final IExclusiveDataAccessSession session = filePersistence
        .createExclusiveDataAccessSession();
    session.open();

    List<Integer> bigList;
    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    bigList = PLinkedList.newInstance(instanceFactory);

View Full Code Here


      FilePersistenceTooBigForSerializationException {
    final IExclusiveDataAccessSession session = filePersistence
        .createExclusiveDataAccessSession();

    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    session.open();
    final TreeSupport<String> tree = TreeSupport.newInstance(
        instanceFactory, null, true, false);
    tree.add(ID_KEY_NAME);
    tree.add(TYPE_KEY_NAME);
    final Iterator<String> iterator = tree.iterator();
View Full Code Here

    filePersistence.setAutoSaveEnabled(true);
    filePersistence.maintainInMemorySetup(500);
    filePersistence.setMaintainedInMemoryEnabled(true);
    final IExclusiveDataAccessSession session = filePersistence
        .createExclusiveDataAccessSession();
    session.open();
    session.setObject("key1", new Object());
    session.save();
    session.setObject("key2", new Object());
    session.save();
    session.close();
View Full Code Here

    // filePersistence.setAutoSaveEventListener(this);
    final IExclusiveDataAccessSession session = filePersistence
        .createExclusiveDataAccessSession();
    final IInstanceFactory instanceFactory = session.getInstanceFactory();

    session.open();

    try {
      TypeA typeA = TypeA.newInstance(instanceFactory);
      TypeB typeB = TypeB.newInstance(instanceFactory);
      typeA.setTypeB(typeB);
View Full Code Here

    builder.setProxyMode(true);
    final IFilePersistence filePersistence = builder.build();
    final IExclusiveDataAccessSession session = filePersistence
        .createExclusiveDataAccessSession();
    final IInstanceFactory instancefactory = session.getInstanceFactory();
    session.open();
    final PHashMap map = PHashMap.newInstance(instancefactory);
    assertNotNull("must succeed create an iterator", map.keySet()
        .iterator());
    session.close();
    filePersistence.close();
View Full Code Here

      TestException, ObjectIOException, ObjectIODataCorruptedException,
      HeapException, FilePersistenceTooBigForSerializationException,
      HeapRecordableException {
    final IExclusiveDataAccessSession session = filePersistence
        .createExclusiveDataAccessSession();
    session.open();

    garbageDataIntegrityChecker.check(filePersistence);

    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    Bob1 bob1 = Bob1.newInstance(instanceFactory, true);
View Full Code Here

            .isKnownToGarbage(dataRecordIdentifier));
    session.setObject("bob1",bob1);
   
    session.close(EnumFilePersistenceCloseAction.SAVE);
    filePersistence.garbageSweep("runtime/set");
    session.open();
   
    garbageDataIntegrityChecker.check(filePersistence);
    assertAttachedState(dataRecordIdentifier, true);
    assertFalse("bob1 #" + dataRecordIdentifier
        + " must not be a garbage candidate",
View Full Code Here

      TestException, ObjectIOException, ObjectIODataCorruptedException,
      FilePersistenceTooBigForSerializationException, HeapException {
    filePersistence.setGarbageListener(this);
    final IExclusiveDataAccessSession session = filePersistence
        .createExclusiveDataAccessSession();
    session.open();
    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    final Bob1 bob1 = Bob1.newInstance(instanceFactory, true);
    bob1.setVal(10);
    session.save();
    final DataRecordIdentifier dataRecordIdentifier = filePersistence
View Full Code Here

    garbageDataIntegrityChecker.check(filePersistence);
    assertAttachedState(dataRecordIdentifier, false);
    backgroundGarbageSweep();
    garbageDataIntegrityChecker.check(filePersistence);

    session.open();
    assertDeleted(dataRecordIdentifier);
    final Integer integer = (Integer) session.getObject("K0");
    assertNotNull("must have value", integer);
    assertEquals("bad balue", 0, integer.intValue());
    session.close();
View Full Code Here

      FilePersistenceNotSerializableException, ProxyException,
      ObjectIOException, ObjectIODataCorruptedException, TestException,
      FilePersistenceTooBigForSerializationException, HeapException {
    final IExclusiveDataAccessSession session = filePersistence
        .createExclusiveDataAccessSession();
    session.open();
    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    Bob1 bob1 = Bob1.newInstance(instanceFactory, true);
    bob1.setVal(10);
    session.save();
    final DataRecordIdentifier dataRecordIdentifier = filePersistence
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.