public List distinct(final String fieldName, final DBObject query, final ReadPreference readPreference) {
        return distinct(fieldName, new DBCollectionDistinctOptions().filter(query).readPreference(readPreference));
    }
public List distinct(final String fieldName, final DBObject query, final ReadPreference readPreference) {
        return distinct(fieldName, new DBCollectionDistinctOptions().filter(query).readPreference(readPreference));
    }
public List distinct ( final String fieldName , final DBObject query , final ReadPreference readPreference ) { return distinct ( fieldName , new DBCollectionDistinctOptions ( ) . filter ( query ) . readPreference ( readPreference ) ) ; }
Find the distinct values for a specified field across a collection and returns the results in an array.

@param fieldName      Specifies the field for which to return the distinct values
@param query          specifies the selection query to determine the subset of documents from which to retrieve the distinct values
@param readPreference {@link ReadPreference} to be used for this operation
@return A {@code List} of the distinct values
@mongodb.driver.manual reference/command/distinct Distinct Command
Find the distinct values for a specified field across a collection and returns the results in an array .