public class CreateUserOperation extends java.lang.Object implements AsyncWriteOperation<java.lang.Void>, WriteOperation<java.lang.Void>
| 构造器和说明 |
|---|
CreateUserOperation(MongoCredential credential,
boolean readOnly)
Construct a new instance.
|
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.Void |
execute(WriteBinding binding)
General execute which can return anything of type T
|
void |
executeAsync(AsyncWriteBinding binding,
SingleResultCallback<java.lang.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.
|
public CreateUserOperation(MongoCredential credential, boolean readOnly)
credential - the users credentials.readOnly - true if the user is a readOnly user.public MongoCredential getCredential()
public boolean isReadOnly()
public java.lang.Void execute(WriteBinding binding)
WriteOperationexecute 在接口中 WriteOperation<java.lang.Void>binding - the binding to execute in the context ofpublic void executeAsync(AsyncWriteBinding binding, SingleResultCallback<java.lang.Void> callback)
AsyncWriteOperationexecuteAsync 在接口中 AsyncWriteOperation<java.lang.Void>binding - the binding to execute in the context ofcallback - the callback to be called when the operation has been executed