Class NestedSerializersSnapshotDelegate


  • @Internal
    public class NestedSerializersSnapshotDelegate
    extends Object
    A NestedSerializersSnapshotDelegate represents the snapshots of multiple serializers that are used by an outer serializer. Examples would be tuples, where the outer serializer is the tuple format serializer, and the NestedSerializersSnapshotDelegate holds the serializers for the different tuple fields.

    The NestedSerializersSnapshotDelegate does not implement the TypeSerializerSnapshot interface. It is not meant to be inherited from, but to be composed with a serializer snapshot implementation.

    The NestedSerializersSnapshotDelegate has its own versioning internally, it does not couple its versioning to the versioning of the TypeSerializerSnapshot that builds on top of this class. That way, the NestedSerializersSnapshotDelegate and enclosing TypeSerializerSnapshot the can evolve their formats independently.

    • Constructor Detail

      • NestedSerializersSnapshotDelegate

        public NestedSerializersSnapshotDelegate​(TypeSerializer<?>... serializers)
        Constructor to create a snapshot for writing.
    • Method Detail

      • getRestoredNestedSerializers

        public TypeSerializer<?>[] getRestoredNestedSerializers()
        Produces a restore serializer from each contained serializer configuration snapshot. The serializers are returned in the same order as the snapshots are stored.
      • getRestoredNestedSerializer

        public <T> TypeSerializer<T> getRestoredNestedSerializer​(int pos)
        Creates the restore serializer from the pos-th config snapshot.
      • getNestedSerializerSnapshots

        public TypeSerializerSnapshot<?>[] getNestedSerializerSnapshots()
        Returns the snapshots of the nested serializers.
        Returns:
        the snapshots of the nested serializers.
      • writeNestedSerializerSnapshots

        public final void writeNestedSerializerSnapshots​(DataOutputView out)
                                                  throws IOException
        Writes the composite snapshot of all the contained serializers.
        Throws:
        IOException