MongoLockRepository

uk.gov.hmrc.mongo.lock.MongoLockRepository
@Singleton
class MongoLockRepository(mongoComponent: MongoComponent, timestampSupport: TimestampSupport)(implicit ec: ExecutionContext) extends PlayMongoRepository[Lock], LockRepository

Attributes

Graph
Supertypes
trait MongoDatabaseCollection
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def disownLock(lockId: String, owner: String, updatedExpiry: Option[Instant]): Future[Unit]

Attributes

Definition Classes
override def isLocked(lockId: String, owner: String): Future[Boolean]

Attributes

Definition Classes
override def refreshExpiry(lockId: String, owner: String, ttl: Duration): Future[Boolean]

Attributes

Definition Classes
override def releaseLock(lockId: String, owner: String): Future[Unit]

Attributes

Definition Classes
override def takeLock(lockId: String, owner: String, ttl: Duration): Future[Option[Lock]]

Attributes

Definition Classes

Inherited methods

def ensureIndexes(): Future[Seq[String]]

Attributes

Inherited from:
PlayMongoRepository
def ensureSchema(): Future[Unit]

Attributes

Inherited from:
PlayMongoRepository

Concrete fields

lazy override val requiresTtlIndex: Boolean

Can be overridden if the repository manages it's own data cleanup.

Can be overridden if the repository manages it's own data cleanup.

A comment should be added to document why the repository does't require a ttl index if overriding.

Attributes

Inherited fields

lazy val collection: MongoCollection[Lock]

Attributes

Inherited from:
PlayMongoRepository
final val collectionName: String

Attributes

Inherited from:
PlayMongoRepository
final val domainFormat: Format[Lock]

Attributes

Inherited from:
PlayMongoRepository
final val indexes: Seq[IndexModel]

Attributes

Inherited from:
PlayMongoRepository
lazy val initialised: Future[Unit]

Attributes

Inherited from:
PlayMongoRepository
final val optSchema: Option[BsonDocument]

Attributes

Inherited from:
PlayMongoRepository