private static class MetricTupleScheme extends TupleScheme<Metric> {
@Override
public void write(org.apache.blur.thirdparty.thrift_0_9_0.protocol.TProtocol prot, Metric struct) throws org.apache.blur.thirdparty.thrift_0_9_0.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetName()) {
optionals.set(0);
}
if (struct.isSetStrMap()) {
optionals.set(1);
}
if (struct.isSetLongMap()) {
optionals.set(2);
}
if (struct.isSetDoubleMap()) {
optionals.set(3);
}
oprot.writeBitSet(optionals, 4);
if (struct.isSetName()) {
oprot.writeString(struct.name);
}
if (struct.isSetStrMap()) {
{
oprot.writeI32(struct.strMap.size());
for (Map.Entry<String, String> _iter183 : struct.strMap.entrySet())
{
oprot.writeString(_iter183.getKey());
oprot.writeString(_iter183.getValue());
}
}
}
if (struct.isSetLongMap()) {
{
oprot.writeI32(struct.longMap.size());
for (Map.Entry<String, Long> _iter184 : struct.longMap.entrySet())
{
oprot.writeString(_iter184.getKey());
oprot.writeI64(_iter184.getValue());
}
}
}
if (struct.isSetDoubleMap()) {
{
oprot.writeI32(struct.doubleMap.size());
for (Map.Entry<String, Double> _iter185 : struct.doubleMap.entrySet())
{
oprot.writeString(_iter185.getKey());
oprot.writeDouble(_iter185.getValue());
}
}
}
}