interface Illuminate / Contracts / Cache / Lock
You are viewing an older version of the documentation. For the latest, please visit master documentation.

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.