class Illuminate / Cache / DatabaseLock
You are viewing an older version of the documentation. For the latest, please visit master documentation.

DatabaseLock

Extends

Properties

protected

$connection Connection

The database connection instance.

Default: null
protected

$table string

The database table name.

Default: null
protected

$lottery array

The prune probability odds.

Default: null

Methods

public

__construct ( Connection $connection , $table , $name , $seconds , $owner , $lottery ) : void

Create a new lock instance.

Parameters

  • $connection Connection
  • $table string
  • $name string
  • $seconds int
  • $owner string|null
  • $lottery array
public

acquire ( ) : bool

Attempt to acquire the lock.

protected

expiresAt ( ) : int

Get the UNIX timestamp indicating when the lock should expire.

public

release ( ) : bool

Release the lock.

public

forceRelease ( ) : void

Releases this lock in disregard of ownership.

protected

getCurrentOwner ( ) : string

Returns the owner value written into the driver for this lock.

public

getConnectionName ( ) : string

Get the name of the database connection being used to manage the lock.