Package net.sf.joafip.redblacktree.service

Examples of net.sf.joafip.redblacktree.service.RBTException


  public IRBTNode<E> getRootNode() throws RBTException {
    DataRecordIdentifier dataRecordIdentifier;
    try {
      dataRecordIdentifier = getRootNodeIdentifier();
    } catch (StoreException exception) {
      throw new RBTException(exception);
    }
    IRBTNode<E> rootNode = null;
    if (dataRecordIdentifier != null) {
      rootNode = (IRBTNode<E>) heapRecordableManager
          .getHeapRecordable(dataRecordIdentifier);
    }
    if (rootNode == null && dataRecordIdentifier != null) {
      try {
        final IHeapRecordable heapRecordable = newIHeapRecordableRBTNode(heapRecordableManager);
        rootNode = (IRBTNode<E>) heapRecordable;
        heapRecordable.setDataRecordIdentifier(
        /**/dataRecordIdentifier,
        /**/true/* exist in file */);
        if (!heapRecordableManager.readAndSetState(heapRecordable)) {// NOPMD
          throw new RBTException("failed read and set state: "
              + heapRecordableManager.getReadAndSetStateStatus()
              + ", " + dataRecordIdentifier);
        }
      } catch (HeapRecordableException exception) {
        throw new RBTException(exception);
      }
    }
    return rootNode;
  }
View Full Code Here


      } else {
        dataRecordIdentifier = heapRecordable.getDataRecordIdentifier();
      }
      setRootNodeIdentifier(dataRecordIdentifier);
    } catch (StoreException exception) {
      throw new RBTException(exception);
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.joafip.redblacktree.service.RBTException

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.