Examples of HeapIdNode


Examples of net.sf.joafip.heapfile.record.entity.HeapIdNode

  @Override
  protected DataRecordIdentifier firstDataRecordIdentifierImpl()
      throws HeapException {
    try {
      final HeapIdNode firstHeapIdNode = (HeapIdNode) idNodeTree.first();
      return firstHeapIdNode == null ? null : firstHeapIdNode
          .getElement();
    } catch (RBTException exception) {
      final String message = "failed get first node";
      logger.fatal(message);
      throw new HeapException(message, exception);
View Full Code Here

Examples of net.sf.joafip.heapfile.record.entity.HeapIdNode

  @Override
  public DataRecordIdentifier nextDataRecordIdentifier(
      final DataRecordIdentifier dataRecordIdentifier)
      throws HeapException {
    final HeapIdNode currentHeapIdNode;
    try {
      currentHeapIdNode = (HeapIdNode) idNodeSearchMayBeNotExist(dataRecordIdentifier);
    } catch (HeapException exception) {
      final String message = "failed get current node";
      logger.fatal(message);
      throw new HeapException(message, exception);
    }
    final HeapIdNode nextHeapIdNode;
    try {
      nextHeapIdNode = (HeapIdNode) idNodeTree.next(currentHeapIdNode);
    } catch (RBTException exception) {
      final String message = "failed get next node";
      logger.fatal(message);
      throw new HeapException(message, exception);
    }
    final DataRecordIdentifier element;
    if (nextHeapIdNode == null) {
      element = null;
    } else {
      element = nextHeapIdNode.getElement();
    }
    return element;
  }
View Full Code Here

Examples of net.sf.joafip.heapfile.record.entity.HeapIdNode

  @Override
  protected DataRecordIdentifier lastDataRecordIdentifierImpl()
      throws HeapException {
    try {
      final HeapIdNode firstHeapIdNode = (HeapIdNode) idNodeTree.last();
      return firstHeapIdNode == null ? null : firstHeapIdNode
          .getElement();
    } catch (RBTException exception) {
      final String message = "failed get first node";
      logger.fatal(message);
      throw new HeapException(message, exception);
View Full Code Here

Examples of net.sf.joafip.heapfile.record.entity.HeapIdNode

  @Override
  protected DataRecordIdentifier lowerDataRecordIdentifierImpl(
      final DataRecordIdentifier identifier) throws HeapException {
    try {
      final HeapIdNode heapIdNode = (HeapIdNode) idNodeTree
          .strictlyLess(identifier);
      return heapIdNode == null ? null : heapIdNode.getElement();
    } catch (RBTException e) {
      final String message = SEARCH_FOR_IDENTIFIER_FAILED + IDENTIFIER2
          + identifier;
      logger.fatal(message);
      throw new HeapException(message, e);
View Full Code Here

Examples of net.sf.joafip.heapfile.record.entity.HeapIdNode

  @Override
  protected DataRecordIdentifier floorDataRecordIdentifierImpl(
      final DataRecordIdentifier identifier) throws HeapException {
    try {
      final HeapIdNode heapIdNode = (HeapIdNode) idNodeTree
          .closestLessOrEqual(identifier);
      return heapIdNode == null ? null : heapIdNode.getElement();
    } catch (RBTException e) {
      final String message = SEARCH_FOR_IDENTIFIER_FAILED + IDENTIFIER2
          + identifier;
      logger.fatal(message);
      throw new HeapException(message, e);
View Full Code Here

Examples of net.sf.joafip.heapfile.record.entity.HeapIdNode

  @Override
  protected DataRecordIdentifier ceilingDataRecordIdentifierImpl(
      final DataRecordIdentifier identifier) throws HeapException {
    try {
      final HeapIdNode heapIdNode = (HeapIdNode) idNodeTree
          .closestGreaterOrEqual(identifier);
      return heapIdNode == null ? null : heapIdNode.getElement();
    } catch (RBTException e) {
      final String message = SEARCH_FOR_IDENTIFIER_FAILED + IDENTIFIER2
          + identifier;
      logger.fatal(message);
      throw new HeapException(message, e);
View Full Code Here

Examples of net.sf.joafip.heapfile.record.entity.HeapIdNode

  @Override
  protected DataRecordIdentifier higherDataRecordIdentifierImpl(
      final DataRecordIdentifier identifier) throws HeapException {
    try {
      final HeapIdNode heapIdNode = (HeapIdNode) idNodeTree
          .strictlyGreater(identifier);
      return heapIdNode == null ? null : heapIdNode.getElement();
    } catch (RBTException e) {
      final String message = SEARCH_FOR_IDENTIFIER_FAILED + IDENTIFIER2
          + identifier;
      logger.fatal(message);
      throw new HeapException(message, e);
View Full Code Here

Examples of net.sf.joafip.heapfile.record.entity.HeapIdNode

  protected Set<DataRecordIdentifier> getDataRecordIdentifierSetImpl()
      throws HeapException {
    final Set<DataRecordIdentifier> set = new HashSet<DataRecordIdentifier>();
    try {
      for (IRBTNode<DataRecordIdentifier> rbtNode : idNodeTree) {
        final HeapIdNode node = (HeapIdNode) rbtNode;
        set.add(node.getElement());
      }
    } catch (Exception exception) {
      throw new HeapException(exception);
    }
    return set;
View Full Code Here

Examples of net.sf.joafip.heapfile.record.entity.HeapIdNode

  @Fortest
  @Override
  public long getRecordPositionInfile(final DataRecordIdentifier identifier)
      throws HeapException {
    final HeapIdNode heapIdNode = idNodeSearchMayBeNotExist(identifier);
    if (heapIdNode == null) {
      throw new HeapException("no record for identifier " + identifier);
    }
    return heapIdNode.getPositionInFile();
  }
View Full Code Here

Examples of net.sf.joafip.heapfile.record.entity.HeapIdNode

    // DataRecordIdentifier.ZERO/* nodeIdentification */,
    // false/* freeRecord */, 0/* dataAssociatedSize */,
    // HeapRecord.DATA_RECORD_HEADER_SIZE + 4/* areaSize */);
    heapElementManager.appendHeapFileRecord(heapRecord);

    heapIdNode = new HeapIdNode(heapElementManager,
        heapRecord.getPositionInFile(), -1, -1, -1, false, false, 0,
        heapRecord.getNodeIdentifier());
  }
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.