略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: TokyoTyrant::setMaster

2024-11-15

TokyoTyrant::setMaster

(PECL tokyo_tyrant >= 0.1.0)

TokyoTyrant::setMasterSet the replication master

说明

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

Sets the replication master of the database

Warning

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.

返回值

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);
?>

参见

  • Classname::Method()
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/tokyotyrant.setmaster.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3