Package com.mongodb.operation
Class UserExistsOperation
java.lang.Object
com.mongodb.operation.UserExistsOperation
- All Implemented Interfaces:
AsyncReadOperation<Boolean>,ReadOperation<Boolean>
@Deprecated
public class UserExistsOperation
extends Object
implements AsyncReadOperation<Boolean>, ReadOperation<Boolean>
Deprecated.
An operation that determines if a user exists.
- Since:
- 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionUserExistsOperation(String databaseName, String userName) Deprecated.Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionexecute(ReadBinding binding) Deprecated.General execute which can return anything of type TvoidexecuteAsync(AsyncReadBinding binding, SingleResultCallback<Boolean> callback) Deprecated.General execute which can return anything of type TbooleanDeprecated.Gets the value for retryable reads.retryReads(boolean retryReads) Deprecated.Enables retryable reads if a read fails due to a network error.
-
Constructor Details
-
UserExistsOperation
Deprecated.Construct a new instance.- Parameters:
databaseName- the name of the database for the operation.userName- the name of the user to check if they exist.
-
-
Method Details
-
retryReads
Deprecated.Enables retryable reads if a read fails due to a network error.- Parameters:
retryReads- true if reads should be retried- Returns:
- this
- Since:
- 3.11
-
getRetryReads
public boolean getRetryReads()Deprecated.Gets the value for retryable reads. The default is true.- Returns:
- the retryable reads value
- Since:
- 3.11
-
execute
Deprecated.Description copied from interface:ReadOperationGeneral execute which can return anything of type T- Specified by:
executein interfaceReadOperation<Boolean>- Parameters:
binding- the binding to execute in the context of- Returns:
- T, the result of the execution
-
executeAsync
Deprecated.Description copied from interface:AsyncReadOperationGeneral execute which can return anything of type T- Specified by:
executeAsyncin interfaceAsyncReadOperation<Boolean>- Parameters:
binding- the binding to execute in the context ofcallback- the callback to be called when the operation has been executed
-
CommandWriteOperationdirectly or the mongod shell helpers.