Package com.orientechnologies.orient.core.exception

Examples of com.orientechnologies.orient.core.exception.OSerializationException


      byte[] buffer = new byte[size];
      segment.getFile().read(OConstants.SIZE_INT, buffer, size);

      fromStream(buffer);
    } catch (Exception e) {
      throw new OSerializationException("Can't load database's configuration. The database seems to be corrupted.");
    }
    return this;
  }
View Full Code Here


      segment.getFile().allocateSpace(buffer.length + OConstants.SIZE_INT);
      segment.getFile().writeInt(0, buffer.length);
      segment.getFile().write(OConstants.SIZE_INT, buffer);
    } catch (Exception e) {
      throw new OSerializationException("Error on update storage configuration", e);
    }
  }
View Full Code Here

    super(iDatabase);
    cluster = iCluster;
  }

  public byte[] toStream() throws OSerializationException {
    throw new OSerializationException("Native queries can't be serialized");
  }
View Full Code Here

  public byte[] toStream() throws OSerializationException {
    throw new OSerializationException("Native queries can't be serialized");
  }

  public OSerializableStream fromStream(byte[] iStream) throws OSerializationException {
    throw new OSerializationException("Native queries can't be deserialized");
  }
View Full Code Here

  @Override
  public OStorageConfiguration load() throws OSerializationException {
    try {
      fromStream(serializedContent);
    } catch (Exception e) {
      throw new OSerializationException("Cannot load database's configuration. The database seems to be corrupted.", e);
    }
    return this;
  }
View Full Code Here

  @Override
  public void update() throws OSerializationException {
    try {
      serializedContent = toStream();
    } catch (Exception e) {
      throw new OSerializationException("Error on update storage configuration", e);
    }
  }
View Full Code Here

      return false;

    try {
      itemToStream(iValue, iIndex);
    } catch (IOException e) {
      throw new OSerializationException("Cannot serialize entryRID object: " + this, e);
    }

    if (rids != null)
      rids[iIndex] = iValue;
View Full Code Here

    }

    try {
      itemToStream(iKey, iIndex);
    } catch (IOException e) {
      throw new OSerializationException("Cannot serialize entryRID object: " + this, e);
    }

    if (rids != null)
      rids[iIndex] = iKey;
View Full Code Here

        for (int i = 0; i < size; ++i)
          if (rids[i] != null)
            itemToStream(rids[i], i);

    } catch (IOException e) {
      throw new OSerializationException("Cannot serialize tree entry RID node: " + this, e);
    }

    // RETURN DIRECTLY THE UNDERLYING BUFFER SINCE IT'S FIXED
    final byte[] buffer = stream.getInternalBuffer();
    record.fromStream(buffer);
View Full Code Here

        fromStreamUsingBinarySerializer(iStream);
      else
        fromStreamUsingBinaryStreamSerializer(iStream);
      return this;
    } catch (IOException e) {
      throw new OSerializationException("Can not unmarshall tree node with id ", e);
    } finally {
      PROFILER.stopChrono(PROFILER.getProcessMetric("mvrbtree.entry.fromStream"), "Deserialize a MVRBTree entry", timer);
    }
  }
View Full Code Here

TOP

Related Classes of com.orientechnologies.orient.core.exception.OSerializationException

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.