@Immutable public class ListThriftCodec<T> extends Object implements ThriftCodec<List<T>>
| Constructor and Description |
|---|
ListThriftCodec(ThriftType type,
ThriftCodec<T> elementCodec) |
| Modifier and Type | Method and Description |
|---|---|
ThriftType |
getType()
The Thrift type this codec supports.
|
List<T> |
read(TProtocolReader protocol)
Reads a value from supplied Thrift protocol reader.
|
void |
write(List<T> value,
TProtocolWriter protocol)
Writes a value to the supplied Thrift protocol writer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisNullpublic ListThriftCodec(ThriftType type, ThriftCodec<T> elementCodec)
public ThriftType getType()
ThriftCodecgetType in interface ThriftCodec<List<T>>public List<T> read(TProtocolReader protocol) throws Exception
ThriftCodecread in interface ThriftCodec<List<T>>protocol - the protocol to read fromException - if any problems occurred when reading or coercing the valuepublic void write(List<T> value, TProtocolWriter protocol) throws Exception
ThriftCodecwrite in interface ThriftCodec<List<T>>value - the value to write; not nullprotocol - the protocol to write toException - if any problems occurred when writing or coercing the valueCopyright © 2012–2019. All rights reserved.