Examples of HeapRecordableException


Examples of net.sf.joafip.store.service.heaprecordable.HeapRecordableException

      checkNotSentinel();
      final int numberOfReferencing = referenceLink
          .getNumberOfReferencing();
      return headByteSize + numberOfReferencing * referencingByteSize;
    } catch (RBTException exception) {
      throw new HeapRecordableException(exception);
    }
  }
View Full Code Here

Examples of net.sf.joafip.store.service.heaprecordable.HeapRecordableException

      AbstractConverter binaryConverter;
      try {
        binaryConverter = helperBinaryConversion.integerConverter;
        binaryConverter.fromBinary(binary, currentOffset);
      } catch (BinaryConverterException exception) {
        throw new HeapRecordableException(exception);
      }
      if (!binaryConverter.valueDefinedFromBinary) {
        throw new HeapRecordableException(
            "number of referencing value must be defined");
      }
      final int numberOfReferencing = (Integer) binaryConverter.objectFromBinary;
      binaryConverter.objectFromBinary = null;// NOPMD
      currentOffset += HelperBinaryConversion.INT_BYTE_SIZE;
      binaryConverter = helperBinaryConversion.referenceConverter;
      binaryConverter.fromBinary(binary, currentOffset);
      final DataRecordIdentifier referenced = (DataRecordIdentifier) binaryConverter.objectFromBinary;
      binaryConverter.objectFromBinary = null;// NOPMD
      currentOffset += HelperBinaryConversion.REFERENCE_BYTE_SIZE;

      final ReferenceLink referenceLink = new ReferenceLink(referenced);
      for (int count = 0; count < numberOfReferencing; count++) {
        binaryConverter = helperBinaryConversion.referenceConverter;
        binaryConverter.fromBinary(binary, currentOffset);
        if (!binaryConverter.valueDefinedFromBinary) {
          throw new HeapRecordableException(
              "referencing data record identifier value must be defined");
        }
        final DataRecordIdentifier referencing = (DataRecordIdentifier)
        /**/binaryConverter.objectFromBinary;
        binaryConverter.objectFromBinary = null;// NOPMD
        currentOffset += HelperBinaryConversion.REFERENCE_BYTE_SIZE;
        try {
          binaryConverter = helperBinaryConversion.integerConverter;
          binaryConverter.fromBinary(binary, currentOffset);
        } catch (BinaryConverterException exception) {
          throw new HeapRecordableException(exception);
        }
        if (!binaryConverter.valueDefinedFromBinary) {
          throw new HeapRecordableException(
              "link count value must be defined");
        }
        final Integer linkCount = (Integer) binaryConverter.objectFromBinary;
        binaryConverter.objectFromBinary = null;// NOPMD
        currentOffset += HelperBinaryConversion.INT_BYTE_SIZE;
        try {
          referenceLink.setLinkCount(linkCount, referencing);
        } catch (ReferenceLinkGarbageException exception) {
          throw new HeapRecordableException(exception);
        }
      }
      binaryConverter.objectFromBinary = null;// NOPMD
      referenceLink.setNode(this);
      return referenceLink;
    } catch (BinaryConverterException exception) {
      throw new HeapRecordableException(exception);
    }
  }
View Full Code Here

Examples of net.sf.joafip.store.service.heaprecordable.HeapRecordableException

      throws HeapRecordableException {
    try {
      checkNotSentinel();
      return byteSize;
    } catch (RBTException exception) {
      throw new HeapRecordableException(exception);
    }
  }
View Full Code Here

Examples of net.sf.joafip.store.service.heaprecordable.HeapRecordableException

    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.referenceConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new HeapRecordableException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new HeapRecordableException(
          "data record identifier value must be defined");
    }
    final DataRecordIdentifier objectFromBinary = (DataRecordIdentifier) binaryConverter.objectFromBinary;
    binaryConverter.objectFromBinary = null;// NOPMD
    return objectFromBinary;
View Full Code Here

Examples of net.sf.joafip.store.service.heaprecordable.HeapRecordableException

  @Override
  public int byteSize() throws HeapRecordableException {
    try {
      return byteSize(node.getElement()) + headerByteSize;
    } catch (RBTException exception) {
      throw new HeapRecordableException(exception);
    }
  }
View Full Code Here

Examples of net.sf.joafip.store.service.heaprecordable.HeapRecordableException

      }

      marshallElement(binary, offset, node.getElement());

    } catch (RBTException exception) {
      throw new HeapRecordableException(exception);
    } catch (BinaryConverterException exception) {
      throw new HeapRecordableException(exception);
    }
  }
View Full Code Here

Examples of net.sf.joafip.store.service.heaprecordable.HeapRecordableException

      final E element = unmarshallElement(binary, offset);
      node.setElement(element);

    } catch (RBTException exception) {
      throw new HeapRecordableException(exception);
    }
  }
View Full Code Here

Examples of net.sf.joafip.store.service.heaprecordable.HeapRecordableException

    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.booleanConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new HeapRecordableException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new HeapRecordableException("color value must be defined");
    }
    final Boolean objectFromBinary = (Boolean) binaryConverter.objectFromBinary;
    binaryConverter.objectFromBinary = null;// NOPMD
    return objectFromBinary;
  }
View Full Code Here

Examples of net.sf.joafip.store.service.heaprecordable.HeapRecordableException

    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.integerConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new HeapRecordableException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new HeapRecordableException(
          "number of child value must be defined");
    }
    final Integer objectFromBinary = (Integer) binaryConverter.objectFromBinary;
    binaryConverter.objectFromBinary = null;// NOPMD
    return objectFromBinary;
View Full Code Here

Examples of net.sf.joafip.store.service.heaprecordable.HeapRecordableException

    AbstractConverter binaryConverter;
    try {
      binaryConverter = helperBinaryConversion.nullableAndTypedReferenceConverter;
      binaryConverter.fromBinary(binary, offset);
    } catch (BinaryConverterException exception) {
      throw new HeapRecordableException(exception);
    }
    if (!binaryConverter.valueDefinedFromBinary) {
      throw new HeapRecordableException(
          "data record identifier value must be defined");
    }
    final DataRecordIdentifier objectFromBinary = (DataRecordIdentifier) binaryConverter.objectFromBinary;
    binaryConverter.objectFromBinary = null;// NOPMD
    return objectFromBinary;
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.