ZookeeperConfig::remove

(PECL zookeeper >= 0.6.0, ZooKeeper >= 3.5.0)

ZookeeperConfig::removeRemove servers from the ensemble

Beschreibung

public ZookeeperConfig::remove(string $id_list, int $version = -1, array &$stat = null): void

Parameter-Liste

id_list

Comma separated list of server IDs to be removed from the ensemble. Each has an id of a server to be removed, only for maj. quorums.

version

The expected version of the node. The function will fail if the actual version of the node does not match the expected version. If -1 is used the version check will not take place.

stat

If not NULL, will hold the value of stat for the path on return.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Fehler/Exceptions

This method emits ZookeeperException and it's derivatives when parameters count or types are wrong or fail to save value to node.

Beispiele

Beispiel #1 ZookeeperConfig::remove() example

Remove members.

<?php
$client 
= new Zookeeper();
$client->connect('localhost:2181');
$client->addAuth('digest''timandes:timandes');
$zkConfig $client->getConfig();
$zkConfig->set("server.1=localhost:2888:3888:participant;0.0.0.0:2181,server.2=localhost:2889:3889:participant;0.0.0.0:2182");
$zkConfig->remove("2");
echo 
$zkConfig->get();
if (
$r)
  echo 
$r;
else
  echo 
'ERR';
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

server.1=localhost:2888:3888:participant;0.0.0.0:2181
version=0xca01e881a2

Siehe auch

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Grundlagen von Views in MySQL

Views in einer MySQL-Datenbank bieten die Möglichkeit, eine virtuelle Tabelle basierend auf dem Ergebnis einer SQL-Abfrage zu erstellen. ...

admin

Autor : admin
Kategorie: mySQL-Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

When does relational database efficiency diminish?

What are the key factors determining the threshold at which a relational database ceases to be efficient, necessitating alternative solutions, and ...

Geschrieben von LarmanKhemka am 11.06.2024 09:48:36
Forum: SQL / Datenbanken
Spielplan für 4 Gruppen zu je 6 Teams auf 2 Feldern

Hey, hallöchen! Du musst die Spiele so durchgehen, dass die Platzierung kontrolliert wechseln, dass jedes Team auf den Plätzen spielt. Hier ist ...

Geschrieben von derH0st am 10.06.2024 14:26:06
Forum: PHP Developer Forum
Does Google ignore common words?

Our website is optimized for "mock web services" and "web service mocks," but Google Webmaster doesn't recognize "web services" (or its variations ...

Geschrieben von TahuluLimia am 10.06.2024 12:26:02
Forum: Webmaster
How to overcome Safari's iframe cookie block?

Seeking an elegant solution for cross-domain cookie sharing in my project. Safari's default iframe session cookie block is a hurdle. While the san ...

Geschrieben von BrovtalGemini am 10.06.2024 10:14:21
Forum: HTML, JavaScript, AJAX, jQuery, CSS, Bootstrap, LESS