Enum FlowControlMode
- All Implemented Interfaces:
Serializable
,Comparable<FlowControlMode>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionIn this mode,Mutation
andDeletion
events are automatically acknowledged prior to dispatch to theDatabaseChangeListener
.In this mode, the listener is responsible for callingDocumentChange.flowControlAck()
after eachMutation
andDeletion
event is processed. -
Method Summary
Modifier and TypeMethodDescriptionstatic FlowControlMode
Returns the enum constant of this type with the specified name.static FlowControlMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AUTOMATIC
In this mode,Mutation
andDeletion
events are automatically acknowledged prior to dispatch to theDatabaseChangeListener
.Suitable for listeners whose
DatabaseChangeListener.onMutation(Mutation)
andDatabaseChangeListener.onDeletion(Deletion)
methods either completely process the event (for example, by writing it to disk) or implictly generate backpressure (for example, by writing the event to a bounded blocking queue). -
MANUAL
In this mode, the listener is responsible for callingDocumentChange.flowControlAck()
after eachMutation
andDeletion
event is processed.NOTE: This mode is not recommended, since it can be difficult to ensure events are acknowledged on all code paths, and failure to ACK can cause the server to stop sending events.
-
-
Method Details
-
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
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
-