Packages

package lock

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. case class Lock(id: String, owner: String, timeCreated: Instant, expiryTime: Instant) extends Product with Serializable
  2. trait LockRepository extends AnyRef
    Annotations
    @ImplementedBy()
  3. trait LockService extends AnyRef

    For locking for a particular task.

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

  4. class MongoLockRepository extends PlayMongoRepository[Lock] with LockRepository
    Annotations
    @Singleton()
  5. trait ScheduledLockService extends AnyRef

    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 body has taken longer than the schedulerInterval to 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.

  6. trait TimePeriodLockService extends AnyRef

    For locking for a give time period (i.e.

    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.

Value Members

  1. object Lock extends Serializable
  2. object LockService
  3. object ScheduledLockService
  4. object TimePeriodLockService

Ungrouped