AsyncWriteOperation<Void>
, WriteOperation<Void>
public class CreateUserOperation extends Object implements AsyncWriteOperation<Void>, WriteOperation<Void>
Constructor | Description |
---|---|
CreateUserOperationβ(MongoCredential credential,
boolean readOnly) |
Deprecated.
|
CreateUserOperationβ(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 CreateUserOperationβ(MongoCredential credential, boolean readOnly)
CreateUserOperation(MongoCredential, boolean, WriteConcern)
credential
- the users credentials.readOnly
- true if the user is a readOnly user.public CreateUserOperationβ(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)
WriteOperation
execute
in interface WriteOperation<Void>
binding
- the binding to execute in the context ofpublic void executeAsyncβ(AsyncWriteBinding binding, SingleResultCallback<Void> callback)
AsyncWriteOperation
executeAsync
in interface AsyncWriteOperation<Void>
binding
- the binding to execute in the context ofcallback
- the callback to be called when the operation has been executed