12 private ?array $typeConfigs;
13 private array $clientConf;
20 public function __construct( ?array $typeConfigs, array $clientConf ) {
21 $this->typeConfigs = $typeConfigs;
22 $this->clientConf = $clientConf;
27 return $this->manager;
39 $conf = $this->typeConfigs[$type] ?? null;
40 if ( $conf ===
null ) {
44 $class = $conf[
'class'] ??
null;
45 if ( $class ===
'PoolCounter_Client' ) {
48 $class = PoolCounterClient::class;
51 $poolCounter =
new $class( $conf, $type, $key );
54 if ( $poolCounter instanceof PoolCounterClient ) {
55 $poolCounter->setManager( $this->getClientManager() );
A default PoolCounter, which provides no locking.
Semaphore semantics to restrict how many workers may concurrently perform a task.