public function replaceIfEquals()

in src/Apache/Ignite/Internal/Cache.php [156:175]


    public function replaceIfEquals($key, $value, $newValue): bool
    {
        ArgumentChecker::notNull($key, 'key');
        ArgumentChecker::notNull($value, 'value');
        ArgumentChecker::notNull($newValue, 'newValue');
        $result = false;
        $this->communicator->send(
            ClientOperation::CACHE_REPLACE_IF_EQUALS,
            function (MessageBuffer $payload) use ($key, $value, $newValue)
            {
                $this->writeCacheInfo($payload);
                $this->writeKeyValue($payload, $key, $value);
                $this->communicator->writeObject($payload, $newValue, $this->valueType);
            },
            function (MessageBuffer $payload) use (&$result)
            {
                $result = $payload->readBoolean();
            });
        return $result;
    }