Constants Developer k2hdkcpx Functions

K2hdkc class

K2hdkc class provides methods to handle k2hdkc cluster.

Class summary

class K2hdkc {
    private string $_config_file;
    private int $_port;
    private string $_cuk;
    private bool $_rejoin;
    private bool $_rejoin_forever;
    private bool $_clear_backup;

    /** @var resource|null */
    private $_handle;

    public function __construct(
        string $config_file,
        int $port = 8031,
        string $cuk = null,
        bool $rejoin = true,
        bool $rejoin_forever = true,
        bool $clear_backup = true) {}

    public function __destruct() {}

    public function setValue(
        string $key,
        string $val,
        bool $clear_subkeys = false,
        array $subkeys = null,
        string $password = null,
        int $expiration_duration = 0): bool {}

    public function getValue(
        string $key,
        string $password = null): string|null {}

    public function addSubkey(
        string $key,
        string $subkey,
        string $subval,
        bool $check_attr = true,
        string $password = null,
        int $expiration_duration = 0): bool {}

    public function casGet(
        string $key,
        string $password = null): int|false {}

    public function casDecrement(
        string $key,
        string $password = null,
        int $expiration_duration = 0): bool {}

    public function casIncrement(
        string $key,
        string $password = null,
        int $expiration_duration = 0): bool {}

    public function casInit(
        string $key,
        int $val,
        string $password = null,
        int $expiration_duration = 0): bool {}

    public function casSet(
        string $key,
        int $old_val,
        int $new_val,
        string $password = null,
        int $expiration_duration = 0): bool {}

    public function clearSubkeys(
        string $key): bool {}

    public function close(): bool {}

    public function getAttrs(
        string $key): array|null {}

    public function getSubkeys(
        string $key): array|null {}

    public function queueGet(
        string $prefix,
        bool $is_fifo = true,
        string $password = null): string|null {}

    public function queuePut(
        string $prefix,
        string $val,
        bool $is_fifo = true,
        bool $is_check_attr = true,
        string $password = null,
        int $expiration_duration = 0): bool {}

    public function keyQueueGet(
        string $prefix,
        bool $is_fifo = true,
        string $password = null): array|false {}

    public function keyQueuePut(
        string $prefix,
        string $key,
        string $val,
        bool $is_fifo = true,
        bool $is_check_attr = true,
        string $password = null,
        int $expiration_duration = 0): bool {}

    public function remove(
        string $key,
        string $password = null): bool {}

    public function removeSubkeys(
        string $key,
        array $subkeys,
        bool $nested = false): bool {}

    public function rename(
        string $key,
        string $new_key,
        string $parent_key = null,
        bool $is_check_attr = true,
        string $password = null,
        int $expiration_duration = 0): bool {}

    public function setSubkeys(
        string $key,
        array $subkeys): bool {}

}

Methods

Constants Developer k2hdkcpx Functions