TokyoTyrant::setMaster
(PECL tokyo_tyrant >= 0.1.0)
TokyoTyrant::setMaster — Set the replication master
Description
public mixed TokyoTyrant::setMaster
( string
$host
, int $port
, int $timestamp
[, bool $check_consistency
= true
] )Sets the replication master of the database
Warning
This method is not supported on 32bit platforms.
Parameters
-
host
-
Hostname of the replication master. If
NULL
the replication is disabled. -
port
-
Port of the replication master
-
timestamp
-
Beginning timestamp with microseconds
-
check_consistency
-
Whether to check consistency.
Return Values
This method returns the current object and throws TokyoTyrantException on failure.
Examples
Example #1 TokyoTyrant::setMaster() example
<?php
/* Connect to a database */
$tt = new TokyoTyrant("tokyotyrant.example.com");
/* Disable the replication */
$tt->setMaster(NULL, 0, 0);
?>
See Also
- Classname::Method()
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для работы с базами данных
- Расширения для работы с базами данных отдельных производителей
- tokyo_tyrant
- Функция TokyoTyrant::add() - Adds to a numeric key
- Функция TokyoTyrant::connect() - Connect to a database
- Функция TokyoTyrant::connectUri() - Connects to a database
- Функция TokyoTyrant::__construct() - Construct a new TokyoTyrant object
- Функция TokyoTyrant::copy() - Copies the database
- Функция TokyoTyrant::ext() - Execute a remote script
- Функция TokyoTyrant::fwmKeys() - Returns the forward matching keys
- Функция TokyoTyrant::get() - The get purpose
- Функция TokyoTyrant::getIterator() - Get an iterator
- Функция TokyoTyrant::num() - Number of records in the database
- Функция TokyoTyrant::out() - Removes records
- Функция TokyoTyrant::put() - Puts values
- Функция TokyoTyrant::putCat() - Concatenates to a record
- Функция TokyoTyrant::putKeep() - Puts a record
- Функция TokyoTyrant::putNr() - Puts value
- Функция TokyoTyrant::putShl() - Concatenates to a record
- Функция TokyoTyrant::restore() - Restore the database
- Функция TokyoTyrant::setMaster() - Set the replication master
- Функция TokyoTyrant::size() - Returns the size of the value
- Функция TokyoTyrant::stat() - Get statistics
- Функция TokyoTyrant::sync() - Synchronize the database
- Функция TokyoTyrant::tune() - Tunes connection values
- Функция TokyoTyrant::vanish() - Empties the database
Коментарии
404 Not Found