@Immutable public class MapThriftCodec<K,V> extends Object implements ThriftCodec<Map<K,V>>
| Constructor and Description |
|---|
MapThriftCodec(ThriftType type,
ThriftCodec<K> keyCodec,
ThriftCodec<V> valueCodec) |
| Modifier and Type | Method and Description |
|---|---|
ThriftType |
getType()
The Thrift type this codec supports.
|
Map<K,V> |
read(org.apache.thrift.protocol.TProtocol protocol)
Reads a value from supplied Thrift protocol reader.
|
void |
write(Map<K,V> value,
org.apache.thrift.protocol.TProtocol protocol)
Writes a value to the supplied Thrift protocol writer.
|
public MapThriftCodec(ThriftType type, ThriftCodec<K> keyCodec, ThriftCodec<V> valueCodec)
public ThriftType getType()
ThriftCodecgetType in interface ThriftCodec<Map<K,V>>public Map<K,V> read(org.apache.thrift.protocol.TProtocol protocol) throws Exception
ThriftCodecpublic void write(Map<K,V> value, org.apache.thrift.protocol.TProtocol protocol) throws Exception
ThriftCodecCopyright © 2012-2017. All Rights Reserved.