downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Mongo::getSlave> <Mongo::getHosts
[edit] Last updated: Fri, 23 Mar 2012

view this page in

Mongo::getPoolSize

(Bir sürüm bilgisi bulunamadı; sadece SVN'de olabilir.)

Mongo::getPoolSizeGet pool size for connection pools

Açıklama

public static int Mongo::getPoolSize ( void )
Uyarı

This feature has been DEPRECATED as of version 1.2.3. Relying on this feature is highly discouraged. Please use MongoPool::getSize() instead.

Değiştirgeler

Bu işlevin değiştirgesi yoktur.

Dönen Değerler

Returns the current pool size.

Örnekler

Örnek 1 Changing pool size

This returns the default pool size, sets a new pool size, then prints the new pool size and the pool debugging information. Note that changing the pool size only affects new connection pools, it does not change old ones.

<?php

$connection 
= new Mongo("host1");

// pool size is -1
echo "pool size is: ".Mongo::getPoolSize()."\n";

echo 
"setting pool size to 200\n";

Mongo::setPoolSize(200);

// pool size is 200
echo "pool size is: ".Mongo::getPoolSize()."\n";

$conn2 = new Mongo("host2");

// remaining for host1 is -2
// remaining for host2 is 199
var_dump(Mongo::poolDebug());

?>

Ayrıca Bakınız



add a note add a note User Contributed Notes Mongo::getPoolSize
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites