Package com.orientechnologies.orient.enterprise.channel.binary

Examples of com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.writeBytes()


        final OChannelBinaryAsynchClient network = beginRequest(OChannelBinaryProtocol.REQUEST_RECORD_CREATE);
        lastNetworkUsed = network;

        try {
          network.writeShort((short) iRid.clusterId);
          network.writeBytes(iContent);
          network.writeByte(iRecordType);
          network.writeByte((byte) iMode);

        } finally {
          endRequest(network);
View Full Code Here


        try {
          network.writeRID(iRid);
          if (network.getSrvProtocolVersion() >= 23) {
            network.writeBoolean(updateContent);
          }
          network.writeBytes(iContent);
          network.writeVersion(iVersion);
          network.writeByte(iRecordType);
          network.writeByte((byte) iMode);

        } finally {
View Full Code Here

          try {
            network = beginRequest(OChannelBinaryProtocol.REQUEST_COMMAND);

            network.writeByte((byte) (asynch ? 'a' : 's')); // ASYNC / SYNC
            network.writeBytes(OStreamSerializerAnyStreamable.INSTANCE.toStream(iCommand));

          } finally {
            endRequest(network);
          }
View Full Code Here

          // END OF RECORD ENTRIES
          network.writeByte((byte) 0);

          // SEND INDEX ENTRIES
          network.writeBytes(iTx.getIndexChanges().toStream());
        } finally {
          endRequest(network);
        }

        try {
View Full Code Here

    while (retry)
      try {

        final OChannelBinaryAsynchClient network = storage.beginRequest(iRequest);
        try {
          network.writeBytes(iPayLoad.toStream());
        } finally {
          storage.endRequest(network);
        }

        retry = false;
View Full Code Here

    final byte[] keyStream = new byte[keySerializer.getObjectSize(key)];
    keySerializer.serialize(key, keyStream, 0);
    try {
      OChannelBinaryAsynchClient client = storage.beginRequest(OChannelBinaryProtocol.REQUEST_SBTREE_BONSAI_GET);
      OCollectionNetworkSerializer.INSTANCE.writeCollectionPointer(client, getCollectionPointer());
      client.writeBytes(keyStream);

      storage.endRequest(client);

      storage.beginResponse(client);
      byte[] stream = client.readBytes();
View Full Code Here

    OStorageRemote storage = (OStorageRemote) ODatabaseRecordThreadLocal.INSTANCE.get().getStorage().getUnderlying();
    try {
      OChannelBinaryAsynchClient client = storage.beginRequest(OChannelBinaryProtocol.REQUEST_SBTREE_BONSAI_GET_ENTRIES_MAJOR);
      OCollectionNetworkSerializer.INSTANCE.writeCollectionPointer(client, getCollectionPointer());
      client.writeBytes(keyStream);
      client.writeBoolean(inclusive);

      if (client.getSrvProtocolVersion() >= 21)
        client.writeInt(128);
View Full Code Here

      final OSBTreeRidBag.ChangeSerializationHelper changeSerializer = OSBTreeRidBag.ChangeSerializationHelper.INSTANCE;
      final byte[] stream = new byte[OIntegerSerializer.INT_SIZE + changeSerializer.getChangesSerializedSize(changes.size())];
      changeSerializer.serializeChanges(changes, keySerializer, stream, 0);

      client.writeBytes(stream);

      storage.endRequest(client);

      storage.beginResponse(client);
      int result = client.readInt();
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.