Skip to content

Commit a9f0fc3

Browse files
committed
Deprecate DBCollection hint field
JAVA-3029
1 parent d2efbdc commit a9f0fc3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

driver-legacy/src/main/com/mongodb/DBCollection.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,9 @@ public void createIndex(final DBObject keys, final DBObject options) {
16691669
*
16701670
* @return a list of {@code DBObject} to be used as hints.
16711671
* @mongodb.driver.manual reference/operator/meta/hint/ $hint
1672+
* @deprecated Prefer {@link DBCursor#hint(DBObject)}
16721673
*/
1674+
@Deprecated
16731675
@Nullable
16741676
public List<DBObject> getHintFields() {
16751677
return hintFields;
@@ -1680,7 +1682,9 @@ public List<DBObject> getHintFields() {
16801682
*
16811683
* @param indexes list of indexes to "hint" or force MongoDB to use when performing the query.
16821684
* @mongodb.driver.manual reference/operator/meta/hint/ $hint
1685+
* @deprecated Prefer {@link DBCursor#hint(DBObject)}
16831686
*/
1687+
@Deprecated
16841688
public void setHintFields(final List<? extends DBObject> indexes) {
16851689
this.hintFields = new ArrayList<DBObject>(indexes);
16861690
}

0 commit comments

Comments
 (0)