com.datastrato.gravitino.proto.ProtoSerDe Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Gravitino is a high-performance, geo-distributed and federated metadata lake.
/*
* Copyright 2023 Datastrato Pvt Ltd.
* This software is licensed under the Apache License version 2.
*/
package com.datastrato.gravitino.proto;
import com.google.protobuf.Message;
/**
* This interface defines the contract for a Protocol Buffer Serializer and Deserializer (SerDe).
*
* @param The entity type to be serialized and deserialized.
* @param The Protocol Buffer message type representing the entity.
*/
public interface ProtoSerDe {
/**
* Serializes the provided entity into its corresponding Protocol Buffer message representation.
*
* @param t The entity to be serialized.
* @return The Protocol Buffer message representing the serialized entity.
*/
M serialize(T t);
/**
* Deserializes the provided Protocol Buffer message into its corresponding entity representation.
*
* @param p The Protocol Buffer message to be deserialized.
* @return The entity representing the deserialized Protocol Buffer message.
*/
T deserialize(M p);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy