class
Illuminate
/
Cache
/
DatabaseLock
DatabaseLock
Extends
Properties
protected
$table string
The database table name.
Default: null
protected
$lottery array
The prune probability odds.
Default: null
protected
$defaultTimeoutInSeconds int
The default number of seconds that a lock should be held.
Default: null
Methods
public
__construct ( Connection $connection , $table , $name , $seconds , $owner , $lottery , $defaultTimeoutInSeconds ) : 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.