bootdesk/chat-sdk

Handler
in package

Table of Contents

Constants

DEFAULT_LOCK_TTL_MS  : mixed = 30000

Properties

$lockTtlMs  : int
$state  : StateAdapter
$strategy  : Strategy

Methods

__construct()  : mixed
acquire()  : Lock|null
dequeue()  : QueueEntry|null
enqueue()  : int
extendLock()  : bool
queueDepth()  : int
release()  : void
acquireDebounce()  : Lock|null

Constants

DEFAULT_LOCK_TTL_MS

private mixed DEFAULT_LOCK_TTL_MS = 30000

Properties

$lockTtlMs read-only

private int $lockTtlMs = self::DEFAULT_LOCK_TTL_MS

Methods

acquire()

public acquire(string $threadId) : Lock|null
Parameters
$threadId : string
Return values
Lock|null

enqueue()

public enqueue(string $threadId, QueueEntry $entry[, int $maxSize = 10 ]) : int
Parameters
$threadId : string
$entry : QueueEntry
$maxSize : int = 10
Return values
int

extendLock()

public extendLock(Lock $lock, int $ttlMs) : bool
Parameters
$lock : Lock
$ttlMs : int
Return values
bool

queueDepth()

public queueDepth(string $threadId) : int
Parameters
$threadId : string
Return values
int

release()

public release(Lock|null $lock) : void
Parameters
$lock : Lock|null

acquireDebounce()

private acquireDebounce(string $lockKey) : Lock|null
Parameters
$lockKey : string
Return values
Lock|null
On this page

Search results