Class YdbSpliterator<V>

java.lang.Object
tech.ydb.yoj.repository.ydb.YdbSpliterator<V>
All Implemented Interfaces:
Spliterator<V>

public class YdbSpliterator<V> extends Object implements Spliterator<V>
YdbSpliterator used to read data from YDB streams. It's possible to supply values from different threads, but supplier threads must not call onNext() concurrently. This Spliterator should be explicitly closed by the close() method for finish work in YDB session; when the stream returned by readTable() is used inside a YOJ transaction, close() will be called automatically at transaction end (both commit and rollback).

To use the new implementation, set ReadTableParams<...>.builder().<...>.useNewSpliterator(true).

Note that using the new implementation currently has a negative performance impact, for more information refer to GitHub Issue #42.

  • Constructor Details

    • YdbSpliterator

      public YdbSpliterator(String request, boolean isOrdered)
    • YdbSpliterator

      protected YdbSpliterator(String request, boolean isOrdered, Duration streamWorkTimeout)
  • Method Details