Class MetadataV2V3SerializerBase.DeserializationContext

java.lang.Object
org.apache.flink.runtime.checkpoint.metadata.MetadataV2V3SerializerBase.DeserializationContext
Enclosing class:
MetadataV2V3SerializerBase

protected static final class MetadataV2V3SerializerBase.DeserializationContext extends Object
A context that keeps information needed during serialization. This context is passed along by the methods. In some sense, this replaces the member fields of the class, because the serializer is supposed to be "singleton stateless", and because there are multiple instances involved (metadata serializer, channel state serializer).

The alternative to passing this context along would be to change the serializers to work as actual instances so that they can keep the state. We might still want to do that, but at the time of implementing this, it seems the less invasive change to use this context, and it also works with static methods and with different serializers instances that do not know of each other.

This context is currently hardwired to the FileSystem-based State Backends. At the moment, this works because those are the only ones producing relative file paths handles, which are in turn the only ones needing this context. In the future, we should refactor this, though, and make the DeserializationContext a property of the used checkpoint storage. That makes