uk.gov.hmrc.mongo.lock
Members list
Type members
Classlikes
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class MongoLockRepository
For locking for a particular task. The lock will be released when the task has finished.
For locking for a particular task. The lock will be released when the task has finished.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
LockService.type
Attributes
- Supertypes
-
trait LockRepositoryclass PlayMongoRepository[Lock]trait MongoDatabaseCollectionclass Objecttrait Matchableclass AnyShow all
A locking implementation for scheduled tasks that will only execute the body when a new lock has been acquired.
A locking implementation for scheduled tasks that will only execute the body when a new lock has been acquired.
The lock's ttl is set to be schedulerInterval + 1 second, meaning that the instance that currently owns the lock will always have a chance to refresh the lock and extend the ttl.
If the lock is successfully refreshed, then body will not be executed, as being able to refresh the lock signals that the body of the previous invocation hasn't yet completed.
Once the body has completed it will either:
- Release the lock immediately, when the
bodyhas taken longer than theschedulerIntervalto complete - Disown the lock and amend the ttl to reflect the cadence of the scheduled task
In the event that the scheduled task ends in failure, the lock will be released immediately.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ScheduledLockService.type
For locking for a give time period (i.e. stop other instances executing the task until it stops renewing the lock). The lock will be held on to when the task has finished, until it expires.
For locking for a give time period (i.e. stop other instances executing the task until it stops renewing the lock). The lock will be held on to when the task has finished, until it expires.
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type