/** * Returns the hint BsonValue for which index to use. The default is not to set a hint. * * <p>Hints can either be a BsonString or a BsonDocument.</p> * * @return the hint * @since 3.8 * @mongodb.server.release 3.6 */ public BsonValue getHintBsonValue() { return wrapped.getHint(); }
/** * Returns the hint for which index to use. The default is not to set a hint. * * @return the hint * @since 3.6 * @mongodb.server.release 3.6 */ public BsonDocument getHint() { BsonValue hint = wrapped.getHint(); if (hint == null) { return null; } if (!hint.isDocument()) { throw new IllegalArgumentException("Hint is not a BsonDocument please use the #getHintBsonValue() method. "); } return hint.asDocument(); }
/** * Gets an operation whose execution explains this operation. * * @param explainVerbosity the explain verbosity * @return a read operation that when executed will explain this operation */ public ReadOperation<BsonDocument> asExplainableOperation(final ExplainVerbosity explainVerbosity) { return new AggregateExplainOperation(getNamespace(), getPipeline()) .allowDiskUse(getAllowDiskUse()) .maxTime(getMaxAwaitTime(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS) .hint(wrapped.getHint()); }
/** * Gets an operation whose execution explains this operation. * * @param explainVerbosity the explain verbosity * @return a read operation that when executed will explain this operation */ public AsyncReadOperation<BsonDocument> asExplainableOperationAsync(final ExplainVerbosity explainVerbosity) { return new AggregateExplainOperation(getNamespace(), getPipeline()) .allowDiskUse(getAllowDiskUse()) .maxTime(getMaxAwaitTime(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS) .hint(wrapped.getHint()); }
/** * Returns the hint BsonValue for which index to use. The default is not to set a hint. * * <p>Hints can either be a BsonString or a BsonDocument.</p> * * @return the hint * @since 3.8 * @mongodb.server.release 3.6 */ public BsonValue getHintBsonValue() { return wrapped.getHint(); }
/** * Returns the hint for which index to use. The default is not to set a hint. * * @return the hint * @since 3.6 * @mongodb.server.release 3.6 */ public BsonDocument getHint() { BsonValue hint = wrapped.getHint(); if (hint == null) { return null; } if (!hint.isDocument()) { throw new IllegalArgumentException("Hint is not a BsonDocument please use the #getHintBsonValue() method. "); } return hint.asDocument(); }
/** * Gets an operation whose execution explains this operation. * * @param explainVerbosity the explain verbosity * @return a read operation that when executed will explain this operation */ public ReadOperation<BsonDocument> asExplainableOperation(final ExplainVerbosity explainVerbosity) { return new AggregateExplainOperation(getNamespace(), getPipeline()) .allowDiskUse(getAllowDiskUse()) .maxTime(getMaxAwaitTime(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS) .hint(wrapped.getHint()); }
/** * Gets an operation whose execution explains this operation. * * @param explainVerbosity the explain verbosity * @return a read operation that when executed will explain this operation */ public AsyncReadOperation<BsonDocument> asExplainableOperationAsync(final ExplainVerbosity explainVerbosity) { return new AggregateExplainOperation(getNamespace(), getPipeline()) .allowDiskUse(getAllowDiskUse()) .maxTime(getMaxAwaitTime(TimeUnit.MILLISECONDS), TimeUnit.MILLISECONDS) .hint(wrapped.getHint()); }