Examples of writeLong()


Examples of org.elasticsearch.common.io.stream.HandlesStreamOutput.writeLong()

    @Override public void sendResponse(Streamable message, TransportResponseOptions options) throws IOException {
        CachedStreamOutput.Entry cachedEntry = CachedStreamOutput.popEntry();
        try {
            HandlesStreamOutput stream = cachedEntry.cachedHandlesBytes();
            stream.writeLong(requestId);
            byte status = 0;
            status = TransportStreams.statusSetResponse(status);
            stream.writeByte(status); // 0 for request, 1 for response.
            message.writeTo(stream);
            final byte[] data = cachedEntry.bytes().copiedByteArray();
View Full Code Here

Examples of org.elasticsearch.common.io.stream.StreamOutput.writeLong()

    @Override
    public void sendResponse(TransportResponse response, TransportResponseOptions options) throws IOException {
        BytesStreamOutput bStream = new BytesStreamOutput();
        StreamOutput stream = new HandlesStreamOutput(bStream);
        stream.setVersion(version);
        stream.writeLong(requestId);
        byte status = 0;
        status = TransportStatus.setResponse(status);
        stream.writeByte(status); // 0 for request, 1 for response.
        response.writeTo(stream);
        stream.close();
View Full Code Here

Examples of org.elasticsearch.common.netty.buffer.ChannelBuffer.writeLong()

                    writeBuffer.writeByte(0); // extra length = flags + expiry
                    writeBuffer.writeByte(0); // data type unused
                    writeBuffer.writeShort(0x0000); // OK
                    writeBuffer.writeInt(0); // data length
                    writeBuffer.writeInt(opaque); // opaque
                    writeBuffer.writeLong(0); // cas
                    channel.write(writeBuffer);
                    return MemcachedDispatcher.IGNORE_REQUEST;
                } else if (opcode == 0x07) { // QUIT
                    channel.disconnect();
                } else {
View Full Code Here

Examples of org.exist.storage.io.VariableByteOutputStream.writeLong()

        final TestableUnixStylePermission permission = new TestableUnixStylePermission(mockSecurityManager, ownerId, ownerGroupId, mode);
       
        final long permissionVector = permission.getVector_testable();
       
        //expectations
        mockOstream.writeLong(permissionVector);
        expect(mockIstream.readLong()).andReturn(permissionVector);

        replay(mockSecurityManager, mockOstream, mockIstream);

        permission.write(mockOstream);
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.serialization.ObjectWriter.writeLong()

         for (int i = 0; i < BLOCK_COUNT; i++)
         {
            ow.writeInt(1024);
            ow.writeInt(1024);
            ow.writeInt(1024);
            ow.writeLong(1024);
            ow.writeLong(1024);
            ow.writeLong(1024);
            ow.writeString(str);
            ow.writeString(str);
            ow.write(buf);
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectWriterImpl.writeLong()

         for (int i = 0; i < BLOCK_COUNT; i++)
         {
            ow.writeInt(1024);
            ow.writeInt(1024);
            ow.writeInt(1024);
            ow.writeLong(1024);
            ow.writeLong(1024);
            ow.writeLong(1024);
            ow.writeString(str);
            ow.writeString(str);
            ow.write(buf);
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectZipWriterImpl.writeLong()

                  value = str == null ? null : new ByteArrayInputStream(str.getBytes(Constants.DEFAULT_ENCODING));
               }

               if (value == null)
               {
                  contentLenWriter.writeLong(-1);
               }
               else
               {
                  long len = 0;
                  int read = 0;
View Full Code Here

Examples of org.fusesource.hawtbuf.DataByteArrayOutputStream.writeLong()

            buffer.reset();
            buffer.writeInt(BATCH_CONTROL_RECORD_SIZE);
            buffer.writeByte(Location.BATCH_CONTROL_RECORD_TYPE);
            buffer.writeInt(0);
            buffer.write(BATCH_CONTROL_RECORD_MAGIC);
            buffer.writeLong(0);

            WriteCommand control = writes.peek();
            Iterator<WriteCommand> commands = writes.iterator();
            // Skip the control write:
            commands.next();
View Full Code Here

Examples of org.gradle.messaging.serialize.FlushableEncoder.writeLong()

            FlushableEncoder encoder = new OutputStreamBackedEncoder(outputStream);
            encoder.writeNullableString(pid == null ? null : pid.toString());
            encoder.writeString(uid);
            MultiChoiceAddress multiChoiceAddress = (MultiChoiceAddress) address;
            UUID canonicalAddress = (UUID) multiChoiceAddress.getCanonicalAddress();
            encoder.writeLong(canonicalAddress.getMostSignificantBits());
            encoder.writeLong(canonicalAddress.getLeastSignificantBits());
            encoder.writeInt(multiChoiceAddress.getPort());
            encoder.writeSmallInt(multiChoiceAddress.getCandidates().size());
            for (InetAddress inetAddress : multiChoiceAddress.getCandidates()) {
                encoder.writeBinary(inetAddress.getAddress());
View Full Code Here

Examples of org.gradle.messaging.serialize.OutputStreamBackedEncoder.writeLong()

            FlushableEncoder encoder = new OutputStreamBackedEncoder(outputStream);
            encoder.writeNullableString(pid == null ? null : pid.toString());
            encoder.writeString(uid);
            MultiChoiceAddress multiChoiceAddress = (MultiChoiceAddress) address;
            UUID canonicalAddress = (UUID) multiChoiceAddress.getCanonicalAddress();
            encoder.writeLong(canonicalAddress.getMostSignificantBits());
            encoder.writeLong(canonicalAddress.getLeastSignificantBits());
            encoder.writeInt(multiChoiceAddress.getPort());
            encoder.writeSmallInt(multiChoiceAddress.getCandidates().size());
            for (InetAddress inetAddress : multiChoiceAddress.getCandidates()) {
                encoder.writeBinary(inetAddress.getAddress());
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.