}
}
@Override
public GaugeRollup fromByteBuffer(ByteBuffer byteBuffer) {
CodedInputStream in = CodedInputStream.newInstance(byteBuffer.array());
try {
byte version = in.readRawByte();
if (version != VERSION_1_ROLLUP)
throw new SerializationException(String.format("Unexpected serialization version: %d", (int)version));
return deserializeV1Gauge(in);
} catch (Exception e) {
throw new RuntimeException("Deserialization Failure", e);