T - the type this codec supportspublic interface ThriftCodec<T>
| Modifier and Type | Method and Description |
|---|---|
ThriftType |
getType()
The Thrift type this codec supports.
|
T |
read(org.apache.thrift.protocol.TProtocol protocol)
Reads a value from supplied Thrift protocol reader.
|
void |
write(T value,
org.apache.thrift.protocol.TProtocol protocol)
Writes a value to the supplied Thrift protocol writer.
|
ThriftType getType()
T read(org.apache.thrift.protocol.TProtocol protocol) throws Exception
protocol - the protocol to read fromException - if any problems occurred when reading or coercing the valuevoid write(T value, org.apache.thrift.protocol.TProtocol protocol) throws Exception
value - the value to write; not nullprotocol - the protocol to write toException - if any problems occurred when writing or coercing the valueCopyright © 2012–2014 Facebook, Inc.. All rights reserved.