Class BytesTransportRequest

java.lang.Object
All Implemented Interfaces:
Writeable, org.elasticsearch.common.util.concurrent.RefCounted, TaskAwareRequest

public class BytesTransportRequest
extends TransportRequest
implements org.elasticsearch.common.util.concurrent.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 java.io.IOException
      Throws:
      java.io.IOException
    • BytesTransportRequest

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

    • version

      public Version version()
    • bytes

      public BytesReference bytes()
    • writeThin

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

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

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

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

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