@Immutable public class SetThriftCodec<T> extends Object implements ThriftCodec<Set<T>>
| Constructor and Description |
|---|
SetThriftCodec(ThriftType type,
ThriftCodec<T> elementCodec) |
| Modifier and Type | Method and Description |
|---|---|
ThriftType |
getType()
The Thrift type this codec supports.
|
Set<T> |
read(org.apache.thrift.protocol.TProtocol protocol)
Reads a value from supplied Thrift protocol reader.
|
void |
write(Set<T> value,
org.apache.thrift.protocol.TProtocol protocol)
Writes a value to the supplied Thrift protocol writer.
|
public SetThriftCodec(ThriftType type, ThriftCodec<T> elementCodec)
public ThriftType getType()
ThriftCodecgetType in interface ThriftCodec<Set<T>>public Set<T> read(org.apache.thrift.protocol.TProtocol protocol) throws Exception
ThriftCodecread in interface ThriftCodec<Set<T>>protocol - the protocol to read fromException - if any problems occurred when reading or coercing the valuepublic void write(Set<T> value, org.apache.thrift.protocol.TProtocol protocol) throws Exception
ThriftCodecwrite in interface ThriftCodec<Set<T>>value - the value to write; not nullprotocol - the protocol to write toException - if any problems occurred when writing or coercing the valueCopyright © 2012-2017. All Rights Reserved.