Interface Resumable<Y,​T>

  • Type Parameters:
    Y - the type of the key, name or object that can be addressed by the given offset
    T - the type of the addressable value for the resumable object (for example, a file would use a Long value)

    public interface Resumable<Y,​T>
    This provides an interface for resumable objects. Such objects allow its users to address them at a specific offset. For example, when reading large files, it may be possible to inform the last offset that was read, thus allowing users of this interface to skip to that offset. This can potentially improve resumable operations by allowing reprocessing of data.
    • Method Detail

      • updateLastOffset

        void updateLastOffset​(T offset)
        Updates the last offset the last offset as appropriate for the user of the interface
        Parameters:
        offset - the offset value
      • getLastOffset

        Offset<T> getLastOffset()
        Gets the last offset value
        Returns:
        the last offset value according to the interface and type implemented
      • getAddressable

        Y getAddressable()
        Gets the addressable part (key) of the resumable
        Returns:
        the addressable part of the resumable