Interface BatchLogReader

    • Method Detail

      • getPartitions

        default java.util.List<Partition> getPartitions()
        Retrieve list of partitions of this batch observer.
        Returns:
        list of partitions of this reader
      • getPartitions

        default java.util.List<Partition> getPartitions​(long startStamp)
        Retrieve list of partitions covering data at least from given starting stamp.
        Parameters:
        startStamp - timestamp to start reading from
        Returns:
        list of partitions covering the time range
      • getPartitions

        java.util.List<Partition> getPartitions​(long startStamp,
                                                long endStamp)
        Retrieve list of partitions covering data from the given range.
        Parameters:
        startStamp - starting timestamp (inclusive)
        endStamp - ending timestamp (exclusive)
        Returns:
        list of partitions covering the time range
      • observe

        ObserveHandle observe​(java.util.List<Partition> partitions,
                              java.util.List<AttributeDescriptor<?>> attributes,
                              BatchLogObserver observer)
        Observe data stored in given partitions.
        Parameters:
        partitions - partitions to observe
        attributes - attribute descriptors to filter out
        observer - the observer by which to consume the data
        Returns:
        an ObserveHandle to control the consumption
      • observeOffsets

        default ObserveHandle observeOffsets​(java.util.List<Offset> offsets,
                                             java.util.List<AttributeDescriptor<?>> attributes,
                                             BatchLogObserver observer)
        Observe data stored in given partitions for a given offsets.
        Parameters:
        offsets - offsets to observe
        attributes - attribute descriptors to filter out
        observer - the observer by which to consume the data
        Returns:
        an ObserveHandle to control the consumption