AsyncWriteOperation<Void>, WriteOperation<Void>public class UpdateUserOperation extends Object implements AsyncWriteOperation<Void>, WriteOperation<Void>
| Constructor | Description |
|---|---|
UpdateUserOperation(MongoCredential credential,
boolean readOnly) |
Deprecated.
|
UpdateUserOperation(MongoCredential credential,
boolean readOnly,
WriteConcern writeConcern) |
Construct a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
Void |
execute(WriteBinding binding) |
General execute which can return anything of type T
|
void |
executeAsync(AsyncWriteBinding binding,
SingleResultCallback<Void> callback) |
General execute which can return anything of type T
|
MongoCredential |
getCredential() |
Gets the users credentials.
|
boolean |
isReadOnly() |
Returns true if the user is a readOnly user.
|
@Deprecated public UpdateUserOperation(MongoCredential credential, boolean readOnly)
UpdateUserOperation(MongoCredential, boolean, WriteConcern)credential - the users credentials.readOnly - true if the user is a readOnly user.public UpdateUserOperation(MongoCredential credential, boolean readOnly, WriteConcern writeConcern)
credential - the users credentials.readOnly - true if the user is a readOnly user.writeConcern - the write concernpublic MongoCredential getCredential()
public boolean isReadOnly()
public Void execute(WriteBinding binding)
WriteOperationexecute in interface WriteOperation<Void>binding - the binding to execute in the context ofpublic void executeAsync(AsyncWriteBinding binding, SingleResultCallback<Void> callback)
AsyncWriteOperationexecuteAsync in interface AsyncWriteOperation<Void>binding - the binding to execute in the context ofcallback - the callback to be called when the operation has been executed