All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.wepay.waltz.common.metadata.PartitionMetadataSerializer Maven / Gradle / Ivy

There is a newer version: 0.13.2
Show newest version
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 PartitionMetadata} object.
 */
public class PartitionMetadataSerializer extends SerializerHelper {

    public static final PartitionMetadataSerializer INSTANCE = new PartitionMetadataSerializer();

    @Override
    public void serialize(PartitionMetadata partitionMetadata, DataOutput out) throws IOException {
        partitionMetadata.writeTo(out);
    }

    @Override
    public PartitionMetadata deserialize(DataInput in) throws IOException {
        return PartitionMetadata.readFrom(in);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy