TokyoTyrant
PHP Manual

TokyoTyrant::setMaster

(PECL tokyo_tyrant >= Unknown)

TokyoTyrant::setMasterSet the replication master

Описание

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

Sets the replication master of the database

Предупреждение

This method is not supported on 32bit platforms.

Параметри

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: Default: TRUE

Връщани стойности

This method returns the current object and throws TokyoTyrantException on failure.

Примери

Example #1 TokyoTyrant::setMaster example

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

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

Вж. също


TokyoTyrant
PHP Manual