Packages

p

monix.tail

batches

package batches

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. final class ArrayBatch[A] extends Batch[A]

    Batch implementation that wraps an array, based on ArrayCursor.

  2. final class ArrayCursor[A] extends BatchCursor[A]

    BatchCursor type that works over an underlying Array.

    BatchCursor type that works over an underlying Array.

    NOTE: all transformations happen by copying from the source array into a modified copy, hence all transformations have strict behavior!

    To build an instance, prefer BatchCursor.fromArray.

  3. abstract class Batch[+A] extends Serializable

    The Batch is a BatchCursor factory, similar in spirit with Scala's Iterable.

    The Batch is a BatchCursor factory, similar in spirit with Scala's Iterable.

    Its cursor() method can be called repeatedly to yield the same sequence.

    This class is provided as an alternative to Scala's Iterable because:

    • the list of supported operations is smaller
    • implementations specialized for primitives are provided to avoid boxing
    • it's a factory of BatchCursor, which provides hints for recommendedBatchSize, meaning how many batch can be processed in a batches

    Used in the Iterant implementation.

  4. abstract class BatchCursor[+A] extends Serializable

    Similar to Java's and Scala's Iterator, the BatchCursor type can can be used to iterate over the data in a collection, but it cannot be used to modify the underlying collection.

    Similar to Java's and Scala's Iterator, the BatchCursor type can can be used to iterate over the data in a collection, but it cannot be used to modify the underlying collection.

    Inspired by the standard Iterator, provides a way to efficiently apply operations such as map, filter, collect on the underlying collection without such operations having necessarily lazy behavior. So in other words, when wrapping a standard Array, an application of map will copy the data to a new Array instance with its elements modified, immediately and is thus having strict (eager) behavior. In other cases, when wrapping potentially infinite collections, like Iterable or Stream, that's when lazy behavior happens.

    Sample:

    def sum(cursor: BatchCursor[Int]): Long = {
      var sum = 0L
    
      while (cursor.hasNext()) {
        sum += cursor.next()
      }
      sum
    }

    This class is provided as an alternative to Scala's Iterator because:

    • the list of supported operations is smaller
    • implementations specialized for primitives are provided to avoid boxing
    • depending on the implementation, the behaviour of operators can be eager (e.g. map, filter), but only in case the source cursor doesn't need to be consumed (if the cursor is backed by an array, then a new array gets created, etc.)
    • the recommendedBatchSize can signal how many batch can be processed in batches

    Used in the Iterant implementation.

  5. final class BooleansBatch extends Batch[Boolean]

    Batch implementation specialized for Boolean.

    Batch implementation specialized for Boolean.

    Under the hood it uses an ArrayBatch implementation, which is @specialized. Using BooleansBatch might be desirable instead for isInstanceOf checks.

  6. final class BooleansCursor extends BatchCursor[Boolean]

    BatchCursor implementation specialized for Boolean.

    BatchCursor implementation specialized for Boolean.

    Under the hood it uses an ArrayCursor implementation, which is @specialized. Using BooleansCursor might be desirable instead for isInstanceOf checks.

  7. final class BytesBatch extends Batch[Byte]

    Batch implementation specialized for Byte.

    Batch implementation specialized for Byte.

    Under the hood it uses an ArrayBatch implementation, which is @specialized. Using BytesBatch might be desirable instead for isInstanceOf checks.

  8. final class BytesCursor extends BatchCursor[Byte]

    BatchCursor implementation specialized for Byte.

    BatchCursor implementation specialized for Byte.

    Under the hood it uses an ArrayCursor implementation, which is @specialized. Using BytesCursor might be desirable instead for isInstanceOf checks.

  9. final class CharsBatch extends Batch[Char]

    Batch implementation specialized for Char.

    Batch implementation specialized for Char.

    Under the hood it uses an ArrayBatch implementation, which is @specialized. Using CharsBatch might be desirable instead for isInstanceOf checks.

  10. final class CharsCursor extends BatchCursor[Char]

    BatchCursor implementation specialized for Char.

    BatchCursor implementation specialized for Char.

    Under the hood it uses an ArrayCursor implementation, which is @specialized. Using CharsCursor might be desirable instead for isInstanceOf checks.

  11. final class DoublesBatch extends Batch[Double]

    Batch implementation specialized for Double.

    Batch implementation specialized for Double.

    Under the hood it uses an ArrayBatch implementation, which is @specialized. Using DoublesBatch might be desirable instead for isInstanceOf checks.

  12. final class DoublesCursor extends BatchCursor[Double]

    BatchCursor implementation specialized for Double.

    BatchCursor implementation specialized for Double.

    Under the hood it uses an ArrayCursor implementation, which is @specialized. Using DoublesCursor might be desirable instead for isInstanceOf checks.

  13. abstract class GenericBatch[+A] extends Batch[A]

    Reusable Batch base class that can be used for implementing generators that simply modify their underlying cursor reference.

  14. abstract class GenericCursor[+A] extends BatchCursor[A]

    Reusable BatchCursor base class that can be used for implementing cursors by just providing the primitive operations, hasNext, next and recommendedBatchSize.

  15. final class IntegersBatch extends Batch[Int]

    Batch implementation specialized for Int.

    Batch implementation specialized for Int.

    Under the hood it uses an ArrayBatch implementation, which is @specialized. Using IntegersBatch might be desirable instead for isInstanceOf checks.

  16. final class IntegersCursor extends BatchCursor[Int]

    BatchCursor implementation specialized for Int.

    BatchCursor implementation specialized for Int.

    Under the hood it uses an ArrayCursor implementation, which is @specialized. Using IntegersCursor might be desirable instead for isInstanceOf checks.

  17. final class IteratorCursor[+A] extends BatchCursor[A]

    BatchCursor type that works over an underlying Iterator.

    BatchCursor type that works over an underlying Iterator.

    NOTE: all transformations are delegated to the underlying Iterator and may thus have lazy behavior.

  18. final class LongsBatch extends Batch[Long]

    Batch implementation specialized for Long.

    Batch implementation specialized for Long.

    Under the hood it uses an ArrayBatch implementation, which is @specialized. Using LongsBatch might be desirable instead for isInstanceOf checks.

  19. final class LongsCursor extends BatchCursor[Long]

    BatchCursor implementation specialized for Long.

    BatchCursor implementation specialized for Long.

    Under the hood it uses an ArrayCursor implementation, which is @specialized. Using LongsCursor might be desirable instead for isInstanceOf checks.

  20. final class SeqBatch[+A] extends Batch[A]

    Batch implementation that wraps any Scala Seq.

Value Members

  1. object Batch extends Serializable

    Batch builders.

  2. object BatchCursor extends Serializable

    BatchCursor builders.

  3. object EmptyBatch extends Batch[Nothing]

    Reusable Batch implementation that's always empty.

  4. object EmptyCursor extends BatchCursor[Nothing]

    BatchCursor implementation that's always empty.

Ungrouped