SwayDB icon indicating copy to clipboard operation
SwayDB copied to clipboard

Allow `Stream` to provide a hint for end of stream

Open simerplaha opened this issue 4 years ago • 0 comments

A Stream allows iteration from, before, after, fromOrBefore or fromOrAfter a key.

For example:

Stream<String> stream =
  map
    .from(100)
    .map(KeyVal::value);

If an ending hint is provided the core should be able to perform faster iteration with better caching and reduced IOps.

Example API

Stream<String> stream =
  map
    .from(100)
    .toHint(1000000) //hint or ending hint
    .map(KeyVal::value);

simerplaha avatar Dec 08 '21 20:12 simerplaha