trait Transactions extends AnyRef
Effectively provides the behaviour not available on org.mongodb.scala.ClientSession (driver-scala, nor
com.mongodb.reactivestreams.client.ClientSession driver-reactive-streams) but is available on
com.mongodb.client.ClientSession (driver-core).
It is recommended to use the Future variant (i.e. add .toFuture to all db calls), since the Observable variant
has some surprises. E.g.
- some commands return
Observable[Void]which will ignore any following map/flatMap (e.g. for-comprehension steps)
- Alphabetic
- By Inheritance
- Transactions
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def mongoComponent: MongoComponent
- Attributes
- protected
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withClientSession[A](f: (ClientSession) => Observable[A])(implicit tc: TransactionConfiguration): Observable[A]
- def withClientSession[A](f: (ClientSession) => Future[A])(implicit tc: TransactionConfiguration, ec: ExecutionContext): Future[A]
- def withSessionAndTransaction[A](f: (ClientSession) => Observable[A])(implicit tc: TransactionConfiguration): Observable[A]
- def withSessionAndTransaction[A](f: (ClientSession) => Future[A])(implicit tc: TransactionConfiguration, ec: ExecutionContext): Future[A]
- def withTransaction[A](session: ClientSession, f: => Observable[A])(implicit tc: TransactionConfiguration): Observable[A]
A transaction is started before running the continuation.
A transaction is started before running the continuation. It will be committed or aborted depending on whether the callback executes successfully or not. It also provides retries for network issues See https://github.com/mongodb/mongo-java-driver/tree/r4.3.1/driver-core/src/test/resources/transactions-convenient-api#retry-timeout-is-enforced And https://docs.mongodb.com/manual/core/retryable-writes/#retryable-writes-and-multi-document-transactions
- def withTransaction[A](session: ClientSession, f: => Future[A])(implicit tc: TransactionConfiguration, ec: ExecutionContext): Future[A]
A transaction is started before running the continuation.
A transaction is started before running the continuation. It will be committed or aborted depending on whether the callback executes successfully or not. It also provides retries for network issues See https://github.com/mongodb/mongo-java-driver/tree/r4.3.1/driver-core/src/test/resources/transactions-convenient-api#retry-timeout-is-enforced And https://docs.mongodb.com/manual/core/retryable-writes/#retryable-writes-and-multi-document-transactions
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)