synchronizePages<T, K extends Comparable<K>> function

Future<PageSyncStat> synchronizePages<T, K extends Comparable<K>>(
  1. Page<T> source,
  2. Page<T> target,
  3. K keyFn(
    1. T item
    ),
  4. {Future<bool> onlySource(
    1. T item
    )?,
  5. Future<bool> onlyTarget(
    1. T item
    )?,
  6. Future<bool> matched(
    1. T source,
    2. T target
    )?}
)

Synchronize two pages that are ordered with their keys in ascending order.

Implementation

Future<PageSyncStat> synchronizePages<T, K extends Comparable<K>>(
  Page<T> source,
  Page<T> target,
  K Function(T item) keyFn, {
  Future<bool> Function(T item)? onlySource,
  Future<bool> Function(T item)? onlyTarget,
  Future<bool> Function(T source, T target)? matched,
}) {
  return synchronizeStreamIterators(
    source.asIterator(),
    target.asIterator(),
    keyFn,
    onlySource: onlySource,
    onlyTarget: onlyTarget,
    matched: matched,
  );
}