Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decide about exposing full-blown split() operation #17198

Open
ktoso opened this issue Apr 14, 2015 · 1 comment
Open

Decide about exposing full-blown split() operation #17198

ktoso opened this issue Apr 14, 2015 · 1 comment
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted t:stream

Comments

@ktoso
Copy link
Member

ktoso commented Apr 14, 2015

As follow up to #17196 we now have SplitWhereProcessorImpl which is backing both splitWhen and splitAfter. It could also express arbitrary "split-like" operations. This ticket is about deciding if we want to expose it and if yes, with what API, maybe like:

object SplitDecision {
  sealed abstract class SplitDecision

  /** Splits before the current element. The current element will be the first element in the new substream. */
  case object SplitBefore extends SplitDecision

  /** Splits after the current element. The current element will be the last element in the current substream. */
  case object SplitAfter extends SplitDecision

  /** Drops the current element, completes the current substream. The next element will be emitted into a new substream. */
  case object SplitDrop extends SplitDecision

  /** Emit this element into the current substream. */
  case object Continue extends SplitDecision

  /** Drop this element without signalling it to any substream. */
  case object Drop extends SplitDecision
}

// ---------

def split(decide: Out => SplitDecision): Source[Source[U, Unit], Mat] = ???

TODO: There may have been discussions about this operation around the websocket tickets - dig them up.

@ktoso ktoso added 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted t:stream labels Apr 14, 2015
@ktoso ktoso added this to the streams-1.x milestone Apr 14, 2015
@He-Pin
Copy link
Member

He-Pin commented Apr 14, 2015

nice

@drewhk drewhk modified the milestones: streams-2.0, streams-backlog Dec 8, 2015
@rkuhn rkuhn removed the 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted label Mar 9, 2016
@rkuhn rkuhn added the 1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted label Mar 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - triaged Tickets that are safe to pick up for contributing in terms of likeliness of being accepted t:stream
Projects
None yet
Development

No branches or pull requests

4 participants