Class VoidThriftCodec
java.lang.Object
io.airlift.drift.codec.internal.builtin.VoidThriftCodec
- All Implemented Interfaces:
ThriftCodec<Void>
VoidThriftCodec is a convenience codec used for service invocations that return void type.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()The Thrift type this codec supports.read(TProtocolReader protocol) Always returns null without reading anything from the stream.voidwrite(Void value, TProtocolWriter protocol) Always returns without writing to the stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.airlift.drift.codec.ThriftCodec
isNull
-
Constructor Details
-
VoidThriftCodec
public VoidThriftCodec()
-
-
Method Details
-
getType
Description copied from interface:ThriftCodecThe Thrift type this codec supports. The Thrift type contains the Java generic Type of the codec.- Specified by:
getTypein interfaceThriftCodec<Void>
-
read
Always returns null without reading anything from the stream.- Specified by:
readin interfaceThriftCodec<Void>- Parameters:
protocol- the protocol to read from- Returns:
- the value; not null
-
write
Always returns without writing to the stream.- Specified by:
writein interfaceThriftCodec<Void>- Parameters:
value- the value to write; not nullprotocol- the protocol to write to
-