Skip to content

Commit baebd7d

Browse files
add partial query option flag
1 parent 9e25f38 commit baebd7d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/com/mongodb/Bytes.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,28 @@ public class Bytes extends BSON {
8383
* Set this option to prevent that.
8484
*/
8585
public static final int QUERYOPTION_NOTIMEOUT = 1 << 4;
86+
8687
/**
8788
* Use with TailableCursor.
8889
* If we are at the end of the data, block for a while rather than returning no data.
8990
* After a timeout period, we do return as normal.
9091
*/
9192
public static final int QUERYOPTION_AWAITDATA = 1 << 5;
93+
9294
/**
9395
* Stream the data down full blast in multiple "more" packages, on the assumption that the client will fully read all data queried.
9496
* Faster when you are pulling a lot of data and know you want to pull it all down.
9597
* Note: the client is not allowed to not read all the data unless it closes the connection.
9698
*/
9799
public static final int QUERYOPTION_EXHAUST = 1 << 6;
98100

101+
/**
102+
* Use with sharding (mongos).
103+
* Allows partial results from a sharded system if any shards are down/missing from the cluster. If not used an error will be returned
104+
* from the mongos server.
105+
*/
106+
public static final int QUERYOPTION_PARTIAL = 1 << 7;
107+
99108
/**
100109
* Set when getMore is called but the cursor id is not valid at the server.
101110
* Returned with zero results.
@@ -118,6 +127,7 @@ public class Bytes extends BSON {
118127
*/
119128
public static final int RESULTFLAG_AWAITCAPABLE = 8;
120129

130+
121131
static class OptionHolder {
122132
OptionHolder( OptionHolder parent ){
123133
_parent = parent;

0 commit comments

Comments
 (0)