withRotationLimits method

  1. @visibleForTesting
JsonlSessionStorage withRotationLimits({
  1. int? rotateBytes,
  2. int? hardCapBytes,
})

Test/host hook: the same session state with different rotation limits (the shipped defaults ride the top-level constants).

Implementation

@visibleForTesting
JsonlSessionStorage withRotationLimits({
  int? rotateBytes,
  int? hardCapBytes,
}) {
  return JsonlSessionStorage._(
    _fs,
    _filePath,
    _header!,
    [..._entries],
    _currentLeafId,
    quarantined: _quarantinedEntries,
    ioRetry: _ioRetry,
    headerLine: _headerLine,
    nextPartSeq: _partSeq,
    rotateBytes: rotateBytes,
    hardCapBytes: hardCapBytes,
    rotationSuspended: _rotationSuspended,
  );
}