Class VoidThriftCodec

java.lang.Object
io.airlift.drift.codec.internal.builtin.VoidThriftCodec
All Implemented Interfaces:
ThriftCodec<Void>

@Immutable public class VoidThriftCodec extends Object implements ThriftCodec<Void>
VoidThriftCodec is a convenience codec used for service invocations that return void type.
  • Constructor Details

    • VoidThriftCodec

      public VoidThriftCodec()
  • Method Details

    • getType

      public ThriftType getType()
      Description copied from interface: ThriftCodec
      The Thrift type this codec supports. The Thrift type contains the Java generic Type of the codec.
      Specified by:
      getType in interface ThriftCodec<Void>
    • read

      public Void read(TProtocolReader protocol)
      Always returns null without reading anything from the stream.
      Specified by:
      read in interface ThriftCodec<Void>
      Parameters:
      protocol - the protocol to read from
      Returns:
      the value; not null
    • write

      public void write(Void value, TProtocolWriter protocol)
      Always returns without writing to the stream.
      Specified by:
      write in interface ThriftCodec<Void>
      Parameters:
      value - the value to write; not null
      protocol - the protocol to write to