public static MongoExecution withWriteConcern(WriteConcern writeConcern) { return new MongoExecution().addWriteConcern(writeConcern); }
/** * Use {@link MongoExecution#addWriteConcern(WriteConcern)} instead. * */ @Deprecated public MongoExecution addWriteConcern(String writeConcern) { this.add(WRITE_CONCERN, writeConcern); return this; }
public static MongoExecution withMaxQueryTimeMS(int maxQueryTimeMS) { return new MongoExecution().addMaxQueryTimeMS(maxQueryTimeMS); }
public static MongoExecution withReadPreference(ReadPreference readPreference) { return new MongoExecution().addReadPreference(readPreference); }
public Execution getExecution() { if (execution == null) { MongoExecution mongoExecution = new MongoExecution(); if (getReadPreference() != null) { mongoExecution.addReadPreference(getReadPreference()); execution = mongoExecution; } if (getWriteConcern() != null) { mongoExecution.addWriteConcern(getWriteConcern()); execution = mongoExecution; } if (getMaxQueryTimeMS() != null) { mongoExecution.addMaxQueryTimeMS(getMaxQueryTimeMS()); execution = mongoExecution; } } return execution; }
/** * Use @{link {@link MongoExecution#withWriteConcern(WriteConcern)} instead. * */ @Deprecated public static MongoExecution withWriteConcern(String writeConcern) { return new MongoExecution().addWriteConcern(writeConcern); }
public MongoExecution addMaxQueryTimeMS(int maxQueryTimeMS) { this.add(MAX_QUERY_TIME_MS, JsonNodeFactory.instance.numberNode( maxQueryTimeMS)); return this; }
public MongoExecution addWriteConcern(WriteConcern writeConcern) { this.add(WRITE_CONCERN, writeConcern.name()); return this; }
public MongoExecution addReadPreference(ReadPreference readPreference) { this.add(READ_PREFERENCE, readPreference.toString()); return this; }