@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(TProtocolReader protocol)
Reads a value from supplied Thrift protocol reader.
|
void |
write(T enumConstant,
TProtocolWriter protocol)
Writes a value to the supplied Thrift protocol writer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisNullpublic EnumThriftCodec(ThriftType type)
public ThriftType getType()
ThriftCodecgetType in interface ThriftCodec<T extends Enum<T>>public T read(TProtocolReader protocol) throws Exception
ThriftCodecpublic void write(T enumConstant, TProtocolWriter protocol) throws Exception
ThriftCodecCopyright © 2012–2019. All rights reserved.