public class DataSizeToBytesThriftCodec extends Object implements ThriftCodec<io.airlift.units.DataSize>
| Constructor and Description |
|---|
DataSizeToBytesThriftCodec(ThriftCatalog thriftCatalog) |
| Modifier and Type | Method and Description |
|---|---|
static io.airlift.units.DataSize |
bytesToDataSize(double bytes) |
static double |
dataSizeToBytes(io.airlift.units.DataSize dataSize) |
ThriftType |
getType() |
io.airlift.units.DataSize |
read(TProtocolReader protocol) |
void |
write(io.airlift.units.DataSize dataSize,
TProtocolWriter protocol) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisNull@Inject public DataSizeToBytesThriftCodec(ThriftCatalog thriftCatalog)
public ThriftType getType()
getType in interface ThriftCodec<io.airlift.units.DataSize>public io.airlift.units.DataSize read(TProtocolReader protocol) throws Exception
read in interface ThriftCodec<io.airlift.units.DataSize>Exceptionpublic void write(io.airlift.units.DataSize dataSize,
TProtocolWriter protocol)
throws Exception
write in interface ThriftCodec<io.airlift.units.DataSize>Exception@FromThrift public static io.airlift.units.DataSize bytesToDataSize(double bytes)
@ToThrift public static double dataSizeToBytes(io.airlift.units.DataSize dataSize)
Copyright © 2012–2020. All rights reserved.