0 follower

Final Class Yiisoft\Queue\Amqp\Settings\QosSettings

InheritanceYiisoft\Queue\Amqp\Settings\QosSettings

Quality of Service settings for AMQP consumers.

See also \PhpAmqpLib\Channel\AMQPChannel::basic_qos().

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( integer $prefetchSize 0, integer $prefetchCount 0, boolean $global false )
$prefetchSize integer
$prefetchCount integer
$global boolean

                public function __construct(
    private readonly int $prefetchSize = 0,
    private readonly int $prefetchCount = 0,
    private readonly bool $global = false,
) {
    if ($prefetchSize < 0) {
        throw new InvalidArgumentException('Prefetch size must be a non-negative integer.');
    }
    if ($prefetchCount < 0) {
        throw new InvalidArgumentException('Prefetch count must be a non-negative integer.');
    }
}

            
getPrefetchCount() public method

public integer getPrefetchCount ( )

                public function getPrefetchCount(): int
{
    return $this->prefetchCount;
}

            
getPrefetchSize() public method

public integer getPrefetchSize ( )

                public function getPrefetchSize(): int
{
    return $this->prefetchSize;
}

            
isGlobal() public method

public boolean isGlobal ( )

                public function isGlobal(): bool
{
    return $this->global;
}