Enum OperationType
- java.lang.Object
-
- java.lang.Enum<OperationType>
-
- com.mongodb.client.model.changestream.OperationType
-
- All Implemented Interfaces:
Serializable
,Comparable<OperationType>
public enum OperationType extends Enum<OperationType>
The$changeStream
operation type.- Since:
- 3.6
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DELETE
The delete operation typeDROP
The drop operation typeDROP_DATABASE
The dropDatabase operation typeINSERT
The insert operation typeINVALIDATE
The invalidate operation typeOTHER
The other operation type.RENAME
The rename operation type for renaming collectionsREPLACE
The replace operation typeUPDATE
The update operation type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OperationType
fromString(String operationTypeName)
Returns the ChangeStreamOperationType from the string value.String
getValue()
String
toString()
static OperationType
valueOf(String name)
Returns the enum constant of this type with the specified name.static OperationType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSERT
public static final OperationType INSERT
The insert operation type
-
UPDATE
public static final OperationType UPDATE
The update operation type
-
REPLACE
public static final OperationType REPLACE
The replace operation type
-
DELETE
public static final OperationType DELETE
The delete operation type
-
INVALIDATE
public static final OperationType INVALIDATE
The invalidate operation type
-
DROP
public static final OperationType DROP
The drop operation type- Since:
- 3.8.2
-
DROP_DATABASE
public static final OperationType DROP_DATABASE
The dropDatabase operation type- Since:
- 3.8.2
-
RENAME
public static final OperationType RENAME
The rename operation type for renaming collections- Since:
- 3.8.2
-
OTHER
public static final OperationType OTHER
The other operation type.A placeholder for newer operation types issued by the server. Users encountering OTHER operation types are advised to update the driver to get the actual operation type.
- Since:
- 3.8.2
-
-
Method Detail
-
values
public static OperationType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (OperationType c : OperationType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static OperationType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public String getValue()
- Returns:
- the String representation of the operation type
-
fromString
public static OperationType fromString(String operationTypeName)
Returns the ChangeStreamOperationType from the string value.- Parameters:
operationTypeName
- the string value.- Returns:
- the read concern
-
toString
public String toString()
- Overrides:
toString
in classEnum<OperationType>
-
-