Package net.sf.joafip.store.service.objectio.manager

Examples of net.sf.joafip.store.service.objectio.manager.ClassNameManager


        joafipMutex);
    garbager = new StoreGarbager(this);
    linkManager = new LinkManager(garbageManager);
    garbager.setStoreSaver(this);
    final ClassInfoFactory classInfoFactory = new ClassInfoFactory(0/* currentDataModelIdentifier */);
    classNameManager = new ClassNameManager(heapRecordableManager,
        storeHeader, classInfoFactory, helperBinaryConversion);
    backgroundException = null;// NOPMD
    attachedToRoot = new TreeSet<DataRecordIdentifier>();

  }
View Full Code Here


    dataManager.flush();

    final ClassInfoFactory classInfoFactory = new ClassInfoFactory(1);
    classInfoFactory.setConversionManager(new ConversionManager(
        classInfoFactory));
    final ClassNameManager classNameManager = new ClassNameManager(
        recordableManager, storeHeader, classInfoFactory,
        helperBinaryConversion);
    classNameManager.load();

    assertEquals("must be class #0", 0,
        classNameManager.getIdentifier(classInfoFactory
            .getNoProxyClassInfo(this.getClass())));
    assertTrue("store header must changed", storeHeader.isStateChanged());
    recordableManager.save();
    assertFalse("store header must unchanged", storeHeader.isStateChanged());
    assertEquals("must be class #1", 1,
        classNameManager.getIdentifier(classInfoFactory
            .getNoProxyClassInfo(Integer.class)));
    assertTrue("store header must changed", storeHeader.isStateChanged());
    recordableManager.save();
    assertFalse("store header must unchanged", storeHeader.isStateChanged());
    dataManager.flush();
    classNameManager.clear();
    classNameManager.load();

    assertEquals("must be class #0", 0,
        classNameManager.getIdentifier(classInfoFactory
            .getNoProxyClassInfo(this.getClass())));
    assertEquals("must be class #1", 1,
        classNameManager.getIdentifier(classInfoFactory
            .getNoProxyClassInfo(Integer.class)));
    assertEquals("must be class #2", 2,
        classNameManager.getIdentifier(classInfoFactory
            .getNoProxyClassInfo(String.class)));

    assertEquals("must be this.getClass", this.getClass(), classNameManager
        .getObjectClassInfo(0).getObjectClass());
    assertEquals("must be Integer.class", Integer.class, classNameManager
        .getObjectClassInfo(1).getObjectClass());
    assertEquals("must be String.class", String.class, classNameManager
        .getObjectClassInfo(2).getObjectClass());

    assertTrue("store header must changed", storeHeader.isStateChanged());
    recordableManager.save();
    dataManager.flush();
    classNameManager.clear();
    classNameManager.load();

    assertEquals("must be class #0", 0,
        classNameManager.getIdentifier(classInfoFactory
            .getNoProxyClassInfo(this.getClass())));
    assertEquals("must be class #1", 1,
        classNameManager.getIdentifier(classInfoFactory
            .getNoProxyClassInfo(Integer.class)));
    assertEquals("must be class #2", 2,
        classNameManager.getIdentifier(classInfoFactory
            .getNoProxyClassInfo(String.class)));

    assertEquals("must be this.getClass", this.getClass(), classNameManager
        .getObjectClassInfo(0).getObjectClass());
    assertEquals("must be Integer.class", Integer.class, classNameManager
        .getObjectClassInfo(1).getObjectClass());
    assertEquals("must be String.class", String.class, classNameManager
        .getObjectClassInfo(2).getObjectClass());

  }
View Full Code Here

    final StoreHeader storeHeader = new StoreHeader(heapRecordableManager,
        helperBinaryConversion);
    classInfoFactory = new ClassInfoFactory(1);
    classInfoFactory.setConversionManager(new ConversionManager(
        classInfoFactory));
    final ClassNameManager classNameManager = new ClassNameManager(
        heapRecordableManager, storeHeader, classInfoFactory,
        helperBinaryConversion);
    helperBinaryConversion.initialize(classInfoFactory, null);
    final ClassLoaderProvider classLoaderProvider = new ClassLoaderProvider();
    proxyManager2 = new ProxyManager2(classLoaderProvider, classInfoFactory);
    objectIOManager = new ObjectIOManager(1, dataManager,
        true/* proxy mode */, classNameManager, storeSynchro,
        classInfoFactory, helperBinaryConversion, proxyManager2);
    objectIOManager.setGarbageManagement(true/* garbage management */, this);
    objectStateMap = objectIOManager.getObjectStateMap();
    classNameManager.load();
  }
View Full Code Here

          heapRecordableManager, helperBinaryConversion);
      final ClassInfoFactory classInfoFactory =
      /**/new ClassInfoFactory(1);
      classInfoFactory.setConversionManager(new ConversionManager(
          classInfoFactory));
      final ClassNameManager classNameManager = new ClassNameManager(
          heapRecordableManager, storeHeader, classInfoFactory,
          helperBinaryConversion);
      final StoreSynchro storeSynchro = new StoreSynchro();

      objectIOManager = new ObjectIOManager(1, dataManager,
View Full Code Here

          dataModelConversionDefInputStream, classLoaderProvider);
    } catch (final ConversionException exception) {
      throw new StoreException(exception);
    }

    classNameManager = new ClassNameManager(heapRecordableManager,
        storeHeader, classInfoFactory, helperBinaryConversion);

    try {
      proxyManager2 = new ProxyManager2(classLoaderProvider,
          classInfoFactory);
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.service.objectio.manager.ClassNameManager

Copyright © 2018 www.massapicom. 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.