Examples of IInstanceFactory


Examples of net.sf.joafip.store.service.proxy.IInstanceFactory

      FilePersistenceClassNotFoundException,
      FilePersistenceInvalidClassException,
      FilePersistenceDataCorruptedException,
      FilePersistenceNotSerializableException,
      FilePersistenceTooBigForSerializationException {
    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    session.open();
    saveDoneFlag = false;
    BobASWithTransientCaller bob = BobASWithTransientCaller.newInstance(
        instanceFactory, false);
    assertTrue(MUST_SAVE, saveDoneFlag);
View Full Code Here

Examples of net.sf.joafip.store.service.proxy.IInstanceFactory

      FilePersistenceClassNotFoundException,
      FilePersistenceInvalidClassException,
      FilePersistenceDataCorruptedException,
      FilePersistenceNotSerializableException,
      FilePersistenceTooBigForSerializationException {
    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    session.open();
    final Class<?> objectClass = BobCallInConstructor.class;
    saveDoneFlag = false;
    instanceFactory.newInstance(objectClass,
        new Class<?>[] { String.class }, new Object[] { "a name" });
    assertTrue(MUST_SAVE, saveDoneFlag);
    session.close();
  }
View Full Code Here

Examples of net.sf.joafip.store.service.proxy.IInstanceFactory

  public void testRefToStatic() throws FilePersistenceException,
      FilePersistenceClassNotFoundException,
      FilePersistenceInvalidClassException,
      FilePersistenceDataCorruptedException,
      FilePersistenceNotSerializableException {
    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    session.open();
    final PTreeMap<String, KeyDef> map = (PTreeMap<String, KeyDef>) instanceFactory
        .newInstance(PTreeMap.class);
    map.put(KEY_DEF_1.getName(), KEY_DEF_1);
    map.put(KEY_DEF_2.getName(), KEY_DEF_2);
    final Iterator<Entry<String, KeyDef>> iterator = map.entrySet()
        .iterator();
View Full Code Here

Examples of net.sf.joafip.store.service.proxy.IInstanceFactory

      FilePersistenceClassNotFoundException,
      FilePersistenceInvalidClassException,
      FilePersistenceDataCorruptedException,
      FilePersistenceNotSerializableException,
      FilePersistenceTooBigForSerializationException, ProxyException {
    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    session.open();
    BobForAutoSaveInMethodTest bob = BobForAutoSaveInMethodTest
        .newInstance(instanceFactory);
    assertEquals("bad initial state", 0, bob.getValue());
    saveDoneFlag = false;
View Full Code Here

Examples of net.sf.joafip.store.service.proxy.IInstanceFactory

    final IExclusiveDataAccessSession session = filePersistence
        .createExclusiveDataAccessSession();
    session.open();

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

    session.save();
    assertTrue("must be a proxy", ProxyManager2.isProxyOrEnhanced(bigList));
    for (int count = 0; count < max; count++) {
View Full Code Here

Examples of net.sf.joafip.store.service.proxy.IInstanceFactory

      FilePersistenceNotSerializableException,
      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);
View Full Code Here

Examples of net.sf.joafip.store.service.proxy.IInstanceFactory

      FilePersistenceTooBigForSerializationException, RBTException {
    final IFilePersistence filePersistence = createFilePersistence();
    // filePersistence.setAutoSaveEventListener(this);
    final IExclusiveDataAccessSession session = filePersistence
        .createExclusiveDataAccessSession();
    final IInstanceFactory instanceFactory = session.getInstanceFactory();

    session.open();

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

Examples of net.sf.joafip.store.service.proxy.IInstanceFactory

    builder.setPathName(TestConstant.getWinRamDiskRuntimeDir());
    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();
View Full Code Here

Examples of net.sf.joafip.store.service.proxy.IInstanceFactory

        .createExclusiveDataAccessSession();
    session.open();

    garbageDataIntegrityChecker.check(filePersistence);

    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    Bob1 bob1 = Bob1.newInstance(instanceFactory, true);
    bob1.setVal(10);
    session.save();

    assertTrue("must be unloaded", ProxyManager2.isUnloaded(bob1));
View Full Code Here

Examples of net.sf.joafip.store.service.proxy.IInstanceFactory

      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
        .getCurrentDataRecordIdentifierAssociatedToObject(bob1);
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.