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

Examples of net.sf.joafip.store.service.objectio.ObjectIOException


      throws ObjectIOException {
    this.classNameIdentifier = classNameIdentifier;
    try {
      setStateHaveChanged();
    } catch (HeapRecordableException exception) {
      throw new ObjectIOException(exception);
    }
  }
View Full Code Here


    this.nextClassNameRecordDataRecordIdentifier =
    /**/nextClassNameRecordDataRecordIdentifier;
    try {
      setStateHaveChanged();
    } catch (HeapRecordableException exception) {
      throw new ObjectIOException(exception);
    }
  }
View Full Code Here

    final boolean isStoreRoot;
    isStoreRoot = StoreRoot4.class.isAssignableFrom(objectClassInfo
        .getObjectClass());
    if (Store.IDENTIFIER_FOR_ROOT.value == dataRecordIdentifier.value) {
      if (!isStoreRoot) {
        throw new ObjectIOException(dataRecordIdentifier
            + " is reserved for store root");
      }
    } else {
      if (isStoreRoot) {
        throw new ObjectIOException(dataRecordIdentifier
            + " is a bad data record identifier for store root");
      }
    }
    return true;
  }
View Full Code Here

      ObjectIODataRecordNotFoundException,
      ObjectIOClassNotFoundException,
      ObjectIOTooBigForSerializationException {
    try {
      if (object == null) {
        throw new ObjectIOException("object can not be null");
      }
      model.initializeForMarshal();

      ObjectAndPersistInfo objectToVisit;
      ClassInfo rootObjectClassInfo;
      rootObjectClassInfo = classInfoFactory.getNoProxyClassInfo(object
          .getClass());
      final ObjectAndPersistInfo rootObjectAndItsClassInfo;
      rootObjectAndItsClassInfo =
      /**/getOrCreateObjectPersistInfoOfObject(object, Boolean.FALSE,
          rootObjectClassInfo, true);
      toVisitForSaveQueue.clear();
      visitedForSave.clear();
      toVisitForSaveQueue.add(rootObjectAndItsClassInfo);
      markedNotStorableEncountered = false;
      markedNotStorableList.clear();

      while ((objectToVisit = toVisitForSaveQueue.pollFirst()) != null) {// NOPMD
        visitOneObjectForSave(objectToVisit);
      }
      if (markedNotStorableEncountered) {
        final StringBuilder stringBuilder = new StringBuilder();
        if (markedNotStorableEncountered) {
          stringBuilder.append("not marked storable:\n");
          for (final ObjectAndPersistInfo notStorable : markedNotStorableList) {
            stringBuilder.append(notStorable.toString());
            stringBuilder.append('\n');
          }
          markedNotStorableList.clear();
        }
        throw new ObjectIOException(stringBuilder.toString());
      }

      return model.getData();
    } catch (final ClassInfoException exception) {
      throw new ObjectIOException(exception);
    } finally {
      model.clear();
      toVisitForSaveQueue.clear();
      visitedForSave.clear();
      markedNotStorableList.clear();
View Full Code Here

      throws ObjectIOException, ObjectIODataCorruptedException,
      ObjectIODataRecordNotFoundException {
    final byte[] dataOfDataRecord = model
        .getDataOfDataRecord(dataRecordIdentifier);
    if (dataOfDataRecord == null) {
      throw new ObjectIOException("no data for identifier #"
          + dataRecordIdentifier.toString());
    }
    return dataOfDataRecord;
  }
View Full Code Here

  @Override
  protected void writeDataRecord(
      final DataRecordIdentifier dataRecordIdentifier, final byte[] data)
      throws ObjectIOException {
    if (model.setDataRecord(dataRecordIdentifier, data) != null) {
      throw new ObjectIOException("data for identifier #"
          + dataRecordIdentifier.toString() + " override");
    }
  }
View Full Code Here

  public boolean isValueChanged(
      final ObjectAndPersistInfo objectAndItsClassInfo)
      throws ObjectIOException, ObjectIOInvalidClassException,
      ObjectIONotSerializableException, ObjectIODataCorruptedException,
      ObjectIODataRecordNotFoundException, ObjectIOClassNotFoundException {
    throw new ObjectIOException(MUST_NOT_BE_CALLED);
  }
View Full Code Here

    } catch (final NotSerializableException exception) {
      throw new ObjectIONotSerializableException(
          objectAndItsClassInfo.toString() + " is not serializable",
          exception);
    } catch (final IOException exception) {
      throw new ObjectIOException(exception);
    } catch (final StackOverflowError stackOverflowError) {
      throw new ObjectIOTooBigForSerializationException(// NOPMD do not
                                // care stack
                                // trace
          objectAndItsClassInfo.getObject());
View Full Code Here

  /** always write */
  @Override
  public ObjectClassInfoAndDeclared[] willNotBeWrote(
      final ObjectAndPersistInfo objectAndItsClassInfo)
      throws ObjectIOException {
    throw new ObjectIOException(MUST_NOT_BE_CALLED);
  }
View Full Code Here

  @Override
  public void unsetProxyObjectState(
      final ObjectAndPersistInfo objectAndItsClassInfo)
      throws ObjectIOException, ObjectIOInvalidClassException {
    throw new ObjectIOException(MUST_NOT_BE_CALLED);
  }
View Full Code Here

TOP

Related Classes of net.sf.joafip.store.service.objectio.ObjectIOException

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.