Class BytesTransportRequest

All Implemented Interfaces:
Writeable, org.elasticsearch.core.RefCounted, TaskAwareRequest

public class BytesTransportRequest extends TransportRequest implements org.elasticsearch.core.RefCounted
A specialized, bytes only request, that can potentially be optimized on the network layer, specifically for the same large buffer send to several nodes.
  • Constructor Details

    • BytesTransportRequest

      public BytesTransportRequest(StreamInput in) throws
      Throws:
    • BytesTransportRequest

      public BytesTransportRequest(BytesReference bytes, Version version)
  • Method Details

    • version

      public Version version()
    • bytes

      public BytesReference bytes()
    • writeThin

      public void writeThin(StreamOutput out) throws
      Writes the data in a "thin" manner, without the actual bytes, assumes the actual bytes will be appended right after this content.
      Throws:
    • writeTo

      public void writeTo(StreamOutput out) throws
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class TransportRequest
      Throws:
    • incRef

      public void incRef()
      Specified by:
      incRef in interface org.elasticsearch.core.RefCounted
      Overrides:
      incRef in class TransportMessage
    • tryIncRef

      public boolean tryIncRef()
      Specified by:
      tryIncRef in interface org.elasticsearch.core.RefCounted
      Overrides:
      tryIncRef in class TransportMessage
    • decRef

      public boolean decRef()
      Specified by:
      decRef in interface org.elasticsearch.core.RefCounted
      Overrides:
      decRef in class TransportMessage