Documentation

RegistryInterface
in

Registry interface

A keyed store of WorkerRecords. Each worker writes only its own record, so implementations need no locking, lease or atomic-claim protocol - this is deliberately a much simpler contract than AdapterInterface.

Tags
category

Pop

author

Nick Sagona, III nick@popphp.org

copyright

Copyright (c) 2009-2026 Nick Sagona, III

license

https://www.popphp.org/license New BSD License

version
3.0.0

Table of Contents

Methods

all()  : array<string|int, mixed>
Fetch every stored record, keyed by worker ID
delete()  : void
Remove a record. A no-op if the ID isn't there.
prune()  : int
Remove every record whose heartbeat is older than the given number of seconds, returning how many were removed
read()  : WorkerRecord|null
Fetch a record by ID, or null if it isn't there
write()  : void
Store a record, replacing any existing record with the same ID

Methods

all()

Fetch every stored record, keyed by worker ID

public all() : array<string|int, mixed>
Return values
array<string|int, mixed>

delete()

Remove a record. A no-op if the ID isn't there.

public delete(string $id) : void
Parameters
$id : string

prune()

Remove every record whose heartbeat is older than the given number of seconds, returning how many were removed

public prune(int $olderThanSeconds) : int
Parameters
$olderThanSeconds : int
Return values
int

        
On this page

Search results