Package com.mongodb.operation
Class CreateUserOperation
- java.lang.Object
-
- com.mongodb.operation.CreateUserOperation
-
- All Implemented Interfaces:
AsyncWriteOperation<Void>
,WriteOperation<Void>
@Deprecated public class CreateUserOperation extends Object implements AsyncWriteOperation<Void>, WriteOperation<Void>
Deprecated.useCommandWriteOperation
directly or the mongod shell helpers.An operation to create a user.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description CreateUserOperation(MongoCredential credential, boolean readOnly)
Deprecated.Construct a new instance.CreateUserOperation(MongoCredential credential, boolean readOnly, WriteConcern writeConcern)
Deprecated.Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Void
execute(WriteBinding binding)
Deprecated.General execute which can return anything of type Tvoid
executeAsync(AsyncWriteBinding binding, SingleResultCallback<Void> callback)
Deprecated.General execute which can return anything of type TMongoCredential
getCredential()
Deprecated.Gets the users credentials.boolean
isReadOnly()
Deprecated.Returns true if the user is a readOnly user.
-
-
-
Constructor Detail
-
CreateUserOperation
public CreateUserOperation(MongoCredential credential, boolean readOnly)
Deprecated.Construct a new instance.- Parameters:
credential
- the users credentials.readOnly
- true if the user is a readOnly user.
-
CreateUserOperation
public CreateUserOperation(MongoCredential credential, boolean readOnly, WriteConcern writeConcern)
Deprecated.Construct a new instance.- Parameters:
credential
- the users credentials.readOnly
- true if the user is a readOnly user.writeConcern
- the write concern- Since:
- 3.4
-
-
Method Detail
-
getCredential
public MongoCredential getCredential()
Deprecated.Gets the users credentials.- Returns:
- the users credentials.
-
isReadOnly
public boolean isReadOnly()
Deprecated.Returns true if the user is a readOnly user.- Returns:
- true if the user is a readOnly user.
-
execute
public Void execute(WriteBinding binding)
Deprecated.Description copied from interface:WriteOperation
General execute which can return anything of type T- Specified by:
execute
in interfaceWriteOperation<Void>
- Parameters:
binding
- the binding to execute in the context of- Returns:
- T, the result of the execution
-
executeAsync
public void executeAsync(AsyncWriteBinding binding, SingleResultCallback<Void> callback)
Deprecated.Description copied from interface:AsyncWriteOperation
General execute which can return anything of type T- Specified by:
executeAsync
in interfaceAsyncWriteOperation<Void>
- Parameters:
binding
- the binding to execute in the context ofcallback
- the callback to be called when the operation has been executed
-
-