<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Advances the cluster time for this session</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mongodb-driver-session.aborttransaction.html">MongoDB\Driver\Session::abortTransaction</a></div> <div class="next" style="text-align: right; float: right;"><a href="mongodb-driver-session.advanceoperationtime.html">MongoDB\Driver\Session::advanceOperationTime</a></div> <div class="up"><a href="class.mongodb-driver-session.html">MongoDB\Driver\Session</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="mongodb-driver-session.advanceclustertime" class="refentry"> <div class="refnamediv"> <h1 class="refname">MongoDB\Driver\Session::advanceClusterTime</h1> <p class="verinfo">(mongodb >=1.4.0)</p><p class="refpurpose"><span class="refname">MongoDB\Driver\Session::advanceClusterTime</span> — <span class="dc-title">Advances the cluster time for this session</span></p> </div> <div class="refsect1 description" id="refsect1-mongodb-driver-session.advanceclustertime-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">final</span> <span class="modifier">public</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>MongoDB\Driver\Session::advanceClusterTime</strong></span> ( <span class="methodparam"><span class="type"><span class="type array|object">array|object</span></span> <code class="parameter">$clusterTime</code></span> )</div> <p class="para rdfs-comment"> Advances the cluster time for this session. If the cluster time is less than or equal to the session's current cluster time, this function is a no-op. </p> <p class="para"> By using this method in conjunction with <span class="methodname"><a href="mongodb-driver-session.advanceoperationtime.html" class="methodname">MongoDB\Driver\Session::advanceOperationTime()</a></span> to copy the cluster and operation times from another session, you can ensure that operations in this session are causally consistent with the last operation in the other session. </p> </div> <div class="refsect1 parameters" id="refsect1-mongodb-driver-session.advanceclustertime-parameters"> <h3 class="title">Parameters</h3> <dl> <dt> <code class="parameter">clusterTime</code></dt> <dd> <p class="para"> The cluster time is a document containing a logical timestamp and server signature. Typically, this value will be obtained by calling <span class="methodname"><a href="mongodb-driver-session.getclustertime.html" class="methodname">MongoDB\Driver\Session::getClusterTime()</a></span> on another session object. </p> </dd> </dl> </div> <div class="refsect1 returnvalues" id="refsect1-mongodb-driver-session.advanceclustertime-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> No value is returned. </p> </div> <div class="refsect1 errors" id="refsect1-mongodb-driver-session.advanceclustertime-errors"> <h3 class="title">Errors/Exceptions</h3> <ul class="simplelist"> <li class="member">Throws <a href="class.mongodb-driver-exception-invalidargumentexception.html" class="classname">MongoDB\Driver\Exception\InvalidArgumentException</a> on argument parsing errors.</li> </ul> </div> <div class="refsect1 seealso" id="refsect1-mongodb-driver-session.advanceclustertime-seealso"> <h3 class="title">See Also</h3> <ul class="simplelist"> <li class="member"><span class="methodname"><a href="mongodb-driver-session.advanceoperationtime.html" class="methodname" rel="rdfs-seeAlso">MongoDB\Driver\Session::advanceOperationTime()</a> - Advances the operation time for this session</span></li> <li class="member"><span class="methodname"><a href="mongodb-driver-session.getclustertime.html" class="methodname" rel="rdfs-seeAlso">MongoDB\Driver\Session::getClusterTime()</a> - Returns the cluster time for this session</span></li> </ul> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mongodb-driver-session.aborttransaction.html">MongoDB\Driver\Session::abortTransaction</a></div> <div class="next" style="text-align: right; float: right;"><a href="mongodb-driver-session.advanceoperationtime.html">MongoDB\Driver\Session::advanceOperationTime</a></div> <div class="up"><a href="class.mongodb-driver-session.html">MongoDB\Driver\Session</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>