Package com.orientechnologies.orient.core.record.impl

Examples of com.orientechnologies.orient.core.record.impl.ODocument.toStream()


  @Override
  public void onAfterClientRequest(final OClientConnection iConnection, final byte iRequestType) {
    if (iRequestType == OChannelBinaryProtocol.REQUEST_DB_OPEN)
      try {
        final ODocument clusterConfig = getClusterConfiguration(iConnection.database.getName());
        byte[] serializedDocument = clusterConfig != null ? clusterConfig.toStream() : null;
        ((OChannelBinary) iConnection.protocol.getChannel()).writeBytes(serializedDocument);
      } catch (IOException e) {
        throw new OIOException("Error on marshalling of cluster configuration", e);
      }
  }
View Full Code Here


      if (parameters == null || parameters.size() == 0)
        buffer.add(new byte[0]);
      else {
        final ODocument param = new ODocument(database);
        param.field("params", parameters);
        buffer.add(param.toStream());
      }

    } catch (IOException e) {
      throw new OSerializationException("Error while marshalling OCommandRequestTextAbstract impl", e);
    }
View Full Code Here

        }

        // PARAMETERS FOUND, SEND THEM AS DOCUMENT ITSELF
        final ODocument param = new ODocument();
        param.field("params", parameters);
        buffer.add(param.toStream());
      }

    } catch (IOException e) {
      throw new OSerializationException("Error while marshalling OSQLQuery", e);
    }
View Full Code Here

    } else if (currentRecord instanceof ORecordBytes) {
      ORecordBytes rec = (ORecordBytes) currentRecord;
      out.println("--------------------------------------------------");
      out.printf("Flat - record id: %s   v.%d\n", rec.getIdentity().toString(), rec.getVersion());
      out.println("--------------------------------------------------");
      byte[] value = rec.toStream();
      for (int i = 0; i < Array.getLength(value); ++i) {
        out.printf("%03d", Array.getByte(value, i));
      }

    } else {
View Full Code Here

    } else if (currentRecord instanceof ORecordBytes) {
      ORecordBytes rec = (ORecordBytes) currentRecord;
      out.println("--------------------------------------------------");
      out.printf("Flat - record id: %s   v.%d\n", rec.getIdentity().toString(), rec.getVersion());
      out.println("--------------------------------------------------");
      byte[] value = rec.toStream();
      for (int i = 0; i < Array.getLength(value); ++i) {
        out.printf("%03d", Array.getByte(value, i));
      }

    } else {
View Full Code Here

        buffer.add(new byte[0]);
      else {
        // PARAMETERS FOUND, SEND THEM AS DOCUMENT ITSELF
        final ODocument param = new ODocument();
        param.field("params", parameters);
        buffer.add(param.toStream());
      }

    } catch (IOException e) {
      throw new OSerializationException("Error while marshalling OSQLQuery", e);
    }
View Full Code Here

  @Override
  public void onAfterClientRequest(final OClientConnection iConnection, final byte iRequestType) {
    if (iRequestType == OChannelBinaryProtocol.REQUEST_DB_OPEN)
      try {
        final ODocument clusterConfig = getClusterConfiguration(iConnection.database.getName());
        byte[] serializedDocument = clusterConfig != null ? clusterConfig.toStream() : null;
        ((OChannelBinary) iConnection.protocol.getChannel()).writeBytes(serializedDocument);
      } catch (IOException e) {
        throw new OIOException("Error on marshalling of cluster configuration", e);
      }
  }
View Full Code Here

        buffer.add(new byte[0]);
      else {
        // PARAMETERS FOUND, SEND THEM AS DOCUMENT ITSELF
        final ODocument param = new ODocument();
        param.field("params", parameters);
        buffer.add(param.toStream());
      }

    } catch (IOException e) {
      throw new OSerializationException("Error while marshalling OSQLQuery", e);
    }
View Full Code Here

      if (parameters == null || parameters.size() == 0)
        buffer.add(new byte[0]);
      else {
        final ODocument param = new ODocument(database);
        param.field("params", parameters);
        buffer.add(param.toStream());
      }

    } catch (IOException e) {
      throw new OSerializationException("Error while marshalling OCommandRequestTextAbstract impl", e);
    }
View Full Code Here

    } else if (currentRecord instanceof ORecordBytes) {
      ORecordBytes rec = (ORecordBytes) currentRecord;
      out.println("--------------------------------------------------");
      out.printf("Flat - record id: %s   v.%d\n", rec.getIdentity().toString(), rec.getVersion());
      out.println("--------------------------------------------------");
      byte[] value = rec.toStream();
      for (int i = 0; i < Array.getLength(value); ++i) {
        out.printf("%03d", Array.getByte(value, i));
      }

    } else {
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.