update : 2015.11.03
php.shukuma.com검색:
|
MongoCursor::awaitData(PECL mongo >=1.2.11) MongoCursor::awaitData — Sets whether this cursor will wait for a while for a tailable cursor to return more data 설명This method is to be used with tailable cursors. If we are at the end of the data, block for a while rather than returning no data. After a timeout period, we do return as normal. 인수
반환값Returns this cursor. 오류/예외Throws MongoCursorException if this cursor has started iterating. 예제Example #1 MongoCursor::awaitData() example In this example we tail the "oplog" and instead of sleeping during every iteration, we set the MongoCursor::awaitData() option. MongoCursor::hasNext() will now block until there is more data available.
<?php 참고MongoDB core docs on » tailable cursors.
|