Packages

implicit final class Ops[+A] extends AnyVal

Extension methods for FutureUnlessShutdown

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Ops
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Ops(self: FutureUnlessShutdown[A])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. def asGrpcFuture(implicit ec: ExecutionContext, errorLoggingContext: ErrorLoggingContext): Future[A]

    Converts a com.digitalasset.canton.lifecycle.FutureUnlessShutdown into a scala.concurrent.Future by encoding the shutdown error into a com.digitalasset.canton.networking.grpc.CantonGrpcUtil.GrpcErrors.AbortedDueToShutdown gRPC self-service error.

    Converts a com.digitalasset.canton.lifecycle.FutureUnlessShutdown into a scala.concurrent.Future by encoding the shutdown error into a com.digitalasset.canton.networking.grpc.CantonGrpcUtil.GrpcErrors.AbortedDueToShutdown gRPC self-service error.

    Consider using this method for generally handling com.digitalasset.canton.lifecycle.FutureUnlessShutdown in gRPC services.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def failOnShutdownTo(t: => Throwable)(implicit ec: ExecutionContext): Future[A]

    consider using failOnShutdownToAbortException unless you need a specific exception.

  7. def failOnShutdownToAbortException(action: String)(implicit ec: ExecutionContext): Future[A]

    Converts com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdowns into an internal exception so that shutdowns can tunnel through APIs that expect a plain scala.concurrent.Future Must be used together with com.digitalasset.canton.lifecycle.FutureUnlessShutdown.recoverFromAbortException to turn the internal exception back into com.digitalasset.canton.lifecycle.UnlessShutdown.AbortedDueToShutdown.

  8. def failed(implicit ec: ExecutionContext): FutureUnlessShutdown[Throwable]

    Analog to scala.concurrent.Future.failed

  9. def flatMap[B](f: (A) => FutureUnlessShutdown[B])(implicit ec: ExecutionContext): FutureUnlessShutdown[B]
  10. def flatten[S](implicit ec: ExecutionContext, ev: <:<[A, FutureUnlessShutdown[S]]): FutureUnlessShutdown[S]
  11. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  12. def isCompleted: Boolean
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def map[B](f: (A) => B)(implicit ec: ExecutionContext): FutureUnlessShutdown[B]
  15. def onComplete[B](f: (Try[UnlessShutdown[A]]) => Unit)(implicit ec: ExecutionContext): Unit

    Analog to scala.concurrent.Future.onComplete

  16. def onShutdown[B >: A](f: => B)(implicit ec: ExecutionContext): Future[B]

    Evaluates f and returns its result as a Future if this future completes with UnlessShutdown.AbortedDueToShutdown.

  17. def recover[U >: A](pf: PartialFunction[Throwable, UnlessShutdown[U]])(implicit executor: ExecutionContext): FutureUnlessShutdown[U]

    Analog to scala.concurrent.Future.recover

  18. def subflatMap[B](f: (A) => UnlessShutdown[B])(implicit ec: ExecutionContext): FutureUnlessShutdown[B]
  19. def tapOnShutdown(f: => Unit)(implicit ec: ExecutionContext, errorLoggingContext: ErrorLoggingContext): FutureUnlessShutdown[A]

    Evaluates f on shutdown but retains the result of the future.

  20. def toString(): String
    Definition Classes
    Any
  21. def transform[B](success: (UnlessShutdown[A]) => UnlessShutdown[B], failure: (Throwable) => Throwable)(implicit ec: ExecutionContext): FutureUnlessShutdown[B]

    Analog to scala.concurrent.Future.transform

  22. def transform[B](f: (Try[UnlessShutdown[A]]) => Try[UnlessShutdown[B]])(implicit ec: ExecutionContext): FutureUnlessShutdown[B]

    Analog to scala.concurrent.Future.transform

  23. def transformIntoSuccess[B](f: (Try[UnlessShutdown[A]]) => UnlessShutdown[B])(implicit ec: ExecutionContext): FutureUnlessShutdown[B]
  24. def transformOnShutdown[B >: A](onShutdownOutcome: => B)(implicit ec: ExecutionContext): FutureUnlessShutdown[B]
  25. def transformWith[B](f: (Try[UnlessShutdown[A]]) => FutureUnlessShutdown[B])(implicit ec: ExecutionContext): FutureUnlessShutdown[B]

    Analog to scala.concurrent.Future.transformWith

  26. def transformWithHandledAborted[B](f: (Try[A]) => FutureUnlessShutdown[B])(implicit ec: ExecutionContext): FutureUnlessShutdown[B]

    Similar to transformWith, but more interchangeable with normal scala.concurrent.Future.transformWith

  27. def unwrap: Future[UnlessShutdown[A]]

    Open the type abstraction

  28. def withFilter(p: (A) => Boolean)(implicit executor: ExecutionContext): FutureUnlessShutdown[A]

    Used by for-comprehensions.

Inherited from AnyVal

Inherited from Any

Ungrouped