forked from JetBrains/phpstorm-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWriteConcern.php
82 lines (70 loc) · 2.85 KB
/
WriteConcern.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
namespace MongoDB\Driver;
use MongoDB\BSON\Serializable;
use MongoDB\Driver\Exception\InvalidArgumentException;
use MongoDB\Driver\Exception\UnexpectedValueException;
/**
* WriteConcern controls the acknowledgment of a write operation, specifies the level of write guarantee for Replica Sets.
*/
final class WriteConcern implements Serializable, \Serializable
{
/**
* Majority of all the members in the set; arbiters, non-voting members, passive members, hidden members and delayed members are all included in the definition of majority write concern.
*/
public const MAJORITY = 'majority';
/**
* Construct immutable WriteConcern
* @link https://php.net/manual/en/mongodb-driver-writeconcern.construct.php
* @param string|int $w
* @param int $wtimeout How long to wait (in milliseconds) for secondaries before failing.
* @param bool $journal Wait until mongod has applied the write to the journal.
* @throws InvalidArgumentException on argument parsing errors.
*/
final public function __construct($w, $wtimeout = 0, $journal = false) {}
public static function __set_state(array $properties) {}
/**
* Returns the WriteConcern's "journal" option
* @link https://php.net/manual/en/mongodb-driver-writeconcern.getjournal.php
* @return bool|null
*/
final public function getJournal() {}
/**
* Returns the WriteConcern's "w" option
* @link https://php.net/manual/en/mongodb-driver-writeconcern.getw.php
* @return string|int|null
*/
final public function getW() {}
/**
* Returns the WriteConcern's "wtimeout" option
* @link https://php.net/manual/en/mongodb-driver-writeconcern.getwtimeout.php
* @return int
*/
final public function getWtimeout() {}
/**
* Returns an object for BSON serialization
* @since 1.2.0
* @link https://www.php.net/manual/en/mongodb-driver-writeconcern.bsonserialize.php
* @return object Returns an object for serializing the WriteConcern as BSON.
* @throws InvalidArgumentException
*/
final public function bsonSerialize() {}
/**
* Serialize a WriteConcern
* @since 1.7.0
* @link https://php.net/manual/en/mongodb-driver-writeconcern.serialize.php
* @return string
* @throws InvalidArgumentException
*/
final public function serialize() {}
/**
* Unserialize a WriteConcern
* @since 1.7.0
* @link https://php.net/manual/en/mongodb-driver-writeconcern.unserialize.php
* @param string $serialized
* @return void
* @throws InvalidArgumentException on argument parsing errors or if the properties are invalid
* @throws UnexpectedValueException if the properties cannot be unserialized (i.e. serialized was malformed)
*/
final public function unserialize($serialized) {}
final public function isDefault() {}
}