Enum OperationType
- java.lang.Object
-
- java.lang.Enum<OperationType>
-
- com.mongodb.stitch.core.services.mongodb.remote.OperationType
-
- All Implemented Interfaces:
Serializable
,Comparable<OperationType>
,java.lang.constant.Constable
public enum OperationType extends Enum<OperationType>
Represents the different remote MongoDB operations that can occur.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
-
Method Summary
Modifier and Type Method Description static OperationType
fromRemote(String type)
Returns the appropriate local operation type enum value vased on the remote operation type string from a change stream event.String
toRemote()
Converts this operation to the remote string representation of the operation as represented in aChangeEvent
from a remote cluster.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
-
DELETE
public static final OperationType DELETE
-
REPLACE
public static final OperationType REPLACE
-
UPDATE
public static final OperationType UPDATE
-
UNKNOWN
public static final OperationType UNKNOWN
-
-
Method Detail
-
values
public static OperationType[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- 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
-
fromRemote
public static OperationType fromRemote(String type)
Returns the appropriate local operation type enum value vased on the remote operation type string from a change stream event.- Parameters:
type
- the string description of the operation type.- Returns:
- the operation type.
-
toRemote
public String toRemote()
Converts this operation to the remote string representation of the operation as represented in aChangeEvent
from a remote cluster.- Returns:
- the remote representation of the update operation.
-
-