LockService

uk.gov.hmrc.mongo.lock.LockService
See theLockService companion object
trait LockService

For locking for a particular task. The lock will be released when the task has finished.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def withLock[T](body: => Future[T])(implicit ec: ExecutionContext): Future[Option[T]]

Runs body if a lock can be taken. The lock will be released when the task has finished.

Runs body if a lock can be taken. The lock will be released when the task has finished.

Attributes

Abstract fields

val lockId: String
val ttl: Duration