PHP Velho Oeste 2024

TokyoTyrant::setMaster

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::setMasterレプリケーションのマスタを設定する

説明

public TokyoTyrant::setMaster ( string $host , int $port , int $timestamp [, bool $check_consistency = TRUE ] ) : mixed

データベースのレプリケーション対象のマスタを設定します。

警告

このメソッドは 32bit プラットフォームではサポートされていません。

パラメータ

host

レプリケーション対象のマスタのホスト名。 NULL を与えた場合、レプリケーションが無効になります。

port

レプリケーション対象のマスタのポート番号

timestamp

開始時点のタイムスタンプをミリ秒で指定します。

check_consistency

整合性を確認するかどうか

返り値

このメソッドは 現在のオブジェクトを返します。 失敗したときは TokyoTyrantException をスローします。

例1 TokyoTyrant::setMaster() の例

<?php
/* Connect to a database */
$tt = new TokyoTyrant("tokyotyrant.example.com");

/* Disable the replication */
$tt->setMaster(NULL00);
?>

参考

  • Classname::Method()

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top