Class CheckpointStorageLocationReference

  • All Implemented Interfaces:
    Serializable

    public class CheckpointStorageLocationReference
    extends Object
    implements Serializable
    A reference to a storage location. This is a wrapper around an array of bytes that are subject to interpretation by the state backend's storage locations (similar as a serializer needs to interpret byte streams). There is special handling for a 'default location', which can be used as an optimization by state backends, when no extra information is needed to determine where the checkpoints should be stored (all information can be derived from the configuration and the checkpoint id).

    Why is this simply a byte array?

    The reference is represented via raw bytes, which are subject to interpretation by the state backends. We did not add any more typing and serialization abstraction in between, because these types need to serialize/deserialize fast in between network streams (byte buffers) and barriers. We may ultimately add some more typing if we simply keep the byte buffers for the checkpoint barriers and forward them, thus saving decoding and re-encoding these references repeatedly.

    See Also:
    Serialized Form
    • Constructor Detail

      • CheckpointStorageLocationReference

        public CheckpointStorageLocationReference​(byte[] encodedReference)
        Creates a new location reference.
        Parameters:
        encodedReference - The location reference, represented as bytes (non null)
    • Method Detail

      • getReferenceBytes

        public byte[] getReferenceBytes()
        Gets the reference bytes.

        Important: For efficiency, this method does not make a defensive copy, so the caller must not modify the bytes in the array.

      • isDefaultReference

        public boolean isDefaultReference()
        Returns true, if this object is the default reference.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object