public enum MongoWriteConcern extends Enum<MongoWriteConcern>
WriteConcern
enumeration.Enum Constant and Description |
---|
ACKNOWLEDGED
Write operations that use this write concern will wait for acknowledgement, using the default write concern
configured on the server.
|
DEFAULT
Default write concern.
|
JOURNALED
Write operations wait for the server to group commit to the journal file on disk.
|
MAJORITY
Exceptions are raised for network issues, and server errors; waits on a majority of servers for the write
operation.
|
UNACKNOWLEDGED
Write operations that use this write concern will return as soon as the message is written to the socket.
|
W1
Write operations that use this write concern will wait for acknowledgement from a single member.
|
W2
Write operations that use this write concern will wait for acknowledgement from two members.
|
W3
Write operations that use this write concern will wait for acknowledgement from three members.
|
Modifier and Type | Method and Description |
---|---|
Optional<com.mongodb.WriteConcern> |
getWriteConcern()
Get the actual
WriteConcern implementation, if available. |
static MongoWriteConcern |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MongoWriteConcern[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MongoWriteConcern DEFAULT
public static final MongoWriteConcern UNACKNOWLEDGED
public static final MongoWriteConcern ACKNOWLEDGED
public static final MongoWriteConcern W1
public static final MongoWriteConcern W2
public static final MongoWriteConcern W3
public static final MongoWriteConcern JOURNALED
public static final MongoWriteConcern MAJORITY
public static MongoWriteConcern[] values()
for (MongoWriteConcern c : MongoWriteConcern.values()) System.out.println(c);
public static MongoWriteConcern valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2019 The Holon Platform. All rights reserved.