com.wepay.waltz.common.metadata.ConnectionMetadataSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of waltz-common Show documentation
Show all versions of waltz-common Show documentation
Waltz is a distributed/replicated write ahead log for transactions.
package com.wepay.waltz.common.metadata;
import com.wepay.zktools.zookeeper.serializer.SerializerHelper;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
/**
* Implements the methods to serialize and deserialize {@link ConnectionMetadata} object.
*/
public class ConnectionMetadataSerializer extends SerializerHelper {
public static final ConnectionMetadataSerializer INSTANCE = new ConnectionMetadataSerializer();
@Override
public void serialize(ConnectionMetadata connectionMetadata, DataOutput out) throws IOException {
connectionMetadata.writeTo(out);
}
@Override
public ConnectionMetadata deserialize(DataInput in) throws IOException {
return ConnectionMetadata.readFrom(in);
}
}