Examples of IHeapDataManager


Examples of net.sf.joafip.kvstore.service.IHeapDataManager

    super(name);
  }

  @Override
  protected void setUpImpl() throws Exception {// NOPMD
    final IHeapDataManager dataManager = new HeapMemoryDataManagerMock();
    store = new StoreForTest(1, null, dataManager,
    /**/true/* proxy mode */,
    /**/true/* manage garbage */);
    store.setForceEnhance(ToPersist.class);
    store.openAndNewAccessSession(true/* removeFiles */);
 
View Full Code Here

Examples of net.sf.joafip.kvstore.service.IHeapDataManager

      /* graph analyzing storage */

      final ObjectIOManager objectIOManager = filePersistence
          .getObjectIOManager();
      final IHeapDataManager dataManager = filePersistence
          .getDataManager();

      referenceLinkGraphFromStorage = new ReferenceLinkGraph();

      final Set<DataRecordIdentifier> forObjectDatarecordIdentifierSet = dataManager
          .getDataRecordIdentifierSet();
      forObjectDatarecordIdentifierSet
          .remove(new DataRecordIdentifier(0));

      Set<DataRecordIdentifier> setToUpdate = new TreeSet<DataRecordIdentifier>();
      filePersistence.usedForGarbageManagement(setToUpdate);
      filePersistence.usedForClassNameManagement(setToUpdate);
      forObjectDatarecordIdentifierSet.removeAll(setToUpdate);

      for (DataRecordIdentifier referencingDataRecordIdentifier : forObjectDatarecordIdentifierSet) {
        final ObjectLinkTreeNode objectLinkTreeNode = objectIOManager
            .getObjectLinkTreeNode(referencingDataRecordIdentifier);
        final DataRecordIdentifier[] referencedList = objectLinkTreeNode
            .getReferencedList();
        referenceLinkGraphFromStorage.addReferenced(
            referencingDataRecordIdentifier, referencedList);
      }

      /* graph from storage content */
      referenceLinkGraphFromStorage
          .compute(StoreForTest.IDENTIFIER_FOR_ROOT);

      /* graph from link informations */

      referenceLinkGraphFromLinkInfo = new ReferenceLinkGraph();

      for (ReferenceLink referenceLink : referenceLinks) {
        final DataRecordIdentifier referencedDataRecordIdentifier = referenceLink
            .getReferencedDataRecordIdentifier();
        TestCase.assertTrue("referenced not in storage", dataManager
            .hasDataRecord(referencedDataRecordIdentifier));
        final Collection<Referencing> referencings = referenceLink
            .getReferencing();
        for (Referencing referencing : referencings) {
          final DataRecordIdentifier referencingDataRecordIdentifier = referencing
              .getDataRecordIdentifier();

          final int linkCount = referencing.getLinkCount();
          referenceLinkGraphFromLinkInfo.addReferencing(
              referencedDataRecordIdentifier,
              referencingDataRecordIdentifier, linkCount);
        }
      }

      referenceLinkGraphFromLinkInfo
          .compute(StoreForTest.IDENTIFIER_FOR_ROOT);

      TestCase.assertEquals(
          referenceLinkGraphFromStorage.refMapToString(),
          referenceLinkGraphFromLinkInfo.refMapToString());

      //

      for (DataRecordIdentifierRBTNode candidateNode : knownCandidate) {
        final DataRecordIdentifier candidateDataRecordIdentifier = candidateNode
            .getElement();
        TestCase.assertTrue("candidate not in storage", dataManager
            .hasDataRecord(candidateDataRecordIdentifier));
        /* bad test below, because candidate can be attached to root */
        // TestCase.assertFalse(
        // "candidate can not be attached to root",
        // referenceLinkGraphFromLinkInfo
        // .isInAttachedToRootSet(candidateDataRecordIdentifier));
        // assertNotNull("candidate must be in detached set",
        // referenceLinkGraphFromLinkInfo
        // .getDetachedToRootSet(candidate));
      }

      for (DataRecordIdentifierRBTNode toGrabageNode : knownToGarbage) {
        final DataRecordIdentifier toGarbageDataRecordIdentifier = toGrabageNode
            .getElement();
        TestCase.assertTrue("to garbage not in storage", dataManager
            .hasDataRecord(toGarbageDataRecordIdentifier));
        TestCase.assertFalse(
            "to garbage can not be attached to root",
            referenceLinkGraphFromLinkInfo
                .isInAttachedToRootSet(toGarbageDataRecordIdentifier));
View Full Code Here

Examples of net.sf.joafip.kvstore.service.IHeapDataManager

  protected void setUp() throws Exception {// NOPMD
    super.setUp();
    final StoreSynchro storeSynchro = new StoreSynchro();
    storeSynchro.setPersistenceId(0);
    storeSynchro.newCurrentFileAccessSession();
    final IHeapDataManager dataManager = new HeapMemoryDataManagerMock();
    dataManager.startService(true);
    dataManager.setNextFreeDataRecordIdentifier(DataRecordIdentifier.LAST);
    final HeapRecordableManager heapRecordableManager =
    /**/new HeapRecordableManager(dataManager);
    final HelperBinaryConversion helperBinaryConversion = new HelperBinaryConversion();
    final StoreHeader storeHeader = new StoreHeader(heapRecordableManager,
        helperBinaryConversion);
View Full Code Here

Examples of net.sf.joafip.kvstore.service.IHeapDataManager

  }

  @Override
  protected void setUp() throws Exception {// NOPMD
    super.setUp();
    final IHeapDataManager dataManager = new HeapMemoryDataManagerMock();
    store = new StoreForTest(1, null, dataManager, true/* lazy mode */,
        false/* garbage */);
    store.setRecordSaveActions(true);
  }
 
View Full Code Here

Examples of net.sf.joafip.kvstore.service.IHeapDataManager

      IOException, NoSuchFieldException, IllegalAccessException,
      FilePersistenceTooBigForSerializationException, HeapException {
    final String dataFile = RUNTIME_DIR + "/block.data";
    final String insertLogFilePath = RUNTIME_DIR + "/inserted.txt";
    clearDirectory(RUNTIME_DIR);
    final IHeapDataManager dataManager =
    /**/new BlockDataManager(dataFile, 1024);
    run(insertLogFilePath, null, dataManager, null, NUMBER_OF_ITEM);
  }
View Full Code Here

Examples of net.sf.joafip.kvstore.service.IHeapDataManager

      FilePersistenceClassNotFoundException,
      FilePersistenceDataCorruptedException,
      FilePersistenceTooBigForSerializationException, HeapException {
    final FilePersistenceBuilder builder = new FilePersistenceBuilder();
    final String dataFile = RUNTIME_DIR + "/block.data";
    final IHeapDataManager dataManager =
    /**/new BlockDataManager(dataFile, 1024);
    builder.setDataManager(dataManager);
    builder.setProxyMode(true);
    builder.setRemoveFiles(false);
    builder.setGarbageManagement(false);
View Full Code Here

Examples of net.sf.joafip.kvstore.service.IHeapDataManager

        null/* openFileTraceFile */);
    setup.fileBufferSetup(8 * 1024, 32);
    // if (FILE_CACHE) {
    // setup.cacheSetup(PAGE_SIZE, NUMBER_OF_PAGE);
    // }
    final IHeapDataManager dataManager =
    /**/new BtreePlusDataManager(setup);

    run(insertLogFilePath, null, dataManager, true, NUMBER_OF_ITEM);
  }
View Full Code Here

Examples of net.sf.joafip.kvstore.service.IHeapDataManager

        null/* openFileTraceFile */);
    setup.fileBufferSetup(8 * 1024, 32);
    // if (FILE_CACHE) {
    // setup.cacheSetup(PAGE_SIZE, NUMBER_OF_PAGE);
    // }
    final IHeapDataManager dataManager =
    /**/new BtreePlusDataManager(setup);
    run(insertLogFilePath, null, dataManager, null);
  }
View Full Code Here

Examples of net.sf.joafip.kvstore.service.IHeapDataManager

      FilePersistenceInvalidClassException,
      FilePersistenceDataCorruptedException,
      FilePersistenceNotSerializableException, IOException,
      FilePersistenceTooBigForSerializationException {
    final String dataFile = RUNTIME_DIR + "/block.data";
    final IHeapDataManager dataManager =
    /**/new BlockDataManager(dataFile, 1024);
    final String insertLogFilePath = RUNTIME_DIR + "/inserted.txt";
    run(insertLogFilePath, null, dataManager, null);
  }
View Full Code Here

Examples of net.sf.joafip.kvstore.service.IHeapDataManager

      FilePersistenceClassNotFoundException,
      FilePersistenceDataCorruptedException,
      FilePersistenceTooBigForSerializationException, RBTException,
      HeapException {
    final FilePersistenceBuilder builder = new FilePersistenceBuilder();
    final IHeapDataManager dataManager = new BlockDataManager(10 * 1024,
        10 * 1024, 1024);
    builder.setDataManager(dataManager);
    builder.setProxyMode(true);
    builder.setRemoveFiles(true);
    builder.setCrashSafeMode(false);
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.