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

Cassandra sink #56

Merged
merged 13 commits into from
Nov 30, 2016
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import com.google.common.util.concurrent.{ FutureCallback, Futures, ListenableFu

import scala.concurrent.{ Future, Promise }

package object GuavaFutureOpts {
private[cassandra] final class GuavaFutureOpts[A](val guavaFut: ListenableFuture[A]) extends AnyVal {
private[cassandra] object GuavaFutureOpts {
final class GuavaFutureOpts[A](val guavaFut: ListenableFuture[A]) extends AnyVal {
def asScala(): Future[A] = {
val p = Promise[A]()
val callback = new FutureCallback[A] {
Expand All @@ -20,6 +20,6 @@ package object GuavaFutureOpts {
}
}

private[cassandra] implicit def toGuavaFutureOpts[A](guavaFut: ListenableFuture[A]): GuavaFutureOpts[A] =
implicit def toGuavaFutureOpts[A](guavaFut: ListenableFuture[A]): GuavaFutureOpts[A] =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you make the class implicit you do not need this either

new GuavaFutureOpts(guavaFut)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.