Enum Class OperationType

java.lang.Object
java.lang.Enum<OperationType>
com.mongodb.client.model.changestream.OperationType
All Implemented Interfaces:
Serializable, Comparable<OperationType>, java.lang.constant.Constable

public enum OperationType extends Enum<OperationType>
The $changeStream operation type.
Since:
3.6
  • Enum Constant Details

    • 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 Details

    • values

      public static OperationType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static OperationType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - 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 class Enum<OperationType>