interface Illuminate / Contracts / Cache / Lock
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

Lock

Methods

public

get ( $callback ) : mixed

Attempt to acquire the lock.

Parameters

  • $callback callable|null
public

block ( $seconds , $callback ) : mixed

Attempt to acquire the lock for the given number of seconds.

Parameters

  • $seconds int
  • $callback callable|null
public

release ( ) : bool

Release the lock.

public

owner ( ) : string

Returns the current owner of the lock.

public

forceRelease ( ) : void

Releases this lock in disregard of ownership.