@Immutable public class EnumThriftCodec<T extends Enum<T>> extends Object implements ThriftCodec<T>
| Constructor and Description |
|---|
EnumThriftCodec(ThriftType type) |
| 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 enumConstant,
org.apache.thrift.protocol.TProtocol protocol)
Writes a value to the supplied Thrift protocol writer.
|
public EnumThriftCodec(ThriftType type)
public ThriftType getType()
ThriftCodecgetType in interface ThriftCodec<T extends Enum<T>>public T read(org.apache.thrift.protocol.TProtocol protocol) throws Exception
ThriftCodecpublic void write(T enumConstant, org.apache.thrift.protocol.TProtocol protocol) throws Exception
ThriftCodecCopyright © 2012–2014 Facebook, Inc.. All rights reserved.