array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'mongodb-driver-session.getserver.php', 1 => 'MongoDB\\Driver\\Session::getServer', ), 'up' => array ( 0 => 'class.mongodb-driver-session.php', 1 => 'MongoDB\\Driver\\Session', ), 'prev' => array ( 0 => 'mongodb-driver-session.getoperationtime.php', 1 => 'MongoDB\\Driver\\Session::getOperationTime', ), 'next' => array ( 0 => 'mongodb-driver-session.gettransactionoptions.php', 1 => 'MongoDB\\Driver\\Session::getTransactionOptions', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mongodb/mongodb/driver/session/getserver.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(mongodb >=1.6.0)
MongoDB\Driver\Session::getServer — Returns the server to which this session is pinned
Returns the MongoDB\Driver\Server to which this
session is pinned. If the session is not pinned to a server, null
will be
returned.
Session pinning is primarily used for sharded transactions, as all commands within a sharded transaction must be sent to the same mongos instance. This method is intended to be used by libraries built atop the extension to allow use of a pinned server instead of invoking server selection.
この関数にはパラメータはありません。
Returns the MongoDB\Driver\Server to which this
session is pinned, or null
if the session is not pinned to any server.