Class SetThriftCodec<T>

java.lang.Object
io.airlift.drift.codec.internal.builtin.SetThriftCodec<T>
All Implemented Interfaces:
ThriftCodec<Set<T>>

@Immutable public class SetThriftCodec<T> extends Object implements ThriftCodec<Set<T>>
  • Constructor Details

  • 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<T>
    • read

      public Set<T> read(TProtocolReader protocol) throws Exception
      Description copied from interface: ThriftCodec
      Reads a value from supplied Thrift protocol reader.
      Specified by:
      read in interface ThriftCodec<T>
      Parameters:
      protocol - the protocol to read from
      Returns:
      the value; not null
      Throws:
      Exception - if any problems occurred when reading or coercing the value
    • write

      public void write(Set<T> value, TProtocolWriter protocol) throws Exception
      Description copied from interface: ThriftCodec
      Writes a value to the supplied Thrift protocol writer.
      Specified by:
      write in interface ThriftCodec<T>
      Parameters:
      value - the value to write; not null
      protocol - the protocol to write to
      Throws:
      Exception - if any problems occurred when writing or coercing the value