Package com.couchbase.client.core
Enum Reactor
- java.lang.Object
-
- java.lang.Enum<Reactor>
-
- com.couchbase.client.core.Reactor
-
- All Implemented Interfaces:
Serializable
,Comparable<Reactor>
public enum Reactor extends Enum<Reactor>
This class provides utility methods when working with reactor.- Since:
- 2.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Reactor
valueOf(String name)
Returns the enum constant of this type with the specified name.static Reactor[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.static <T> Mono<T>
wrap(Request<?> request, CompletableFuture<T> response, boolean propagateCancellation)
-
-
-
Method Detail
-
values
public static Reactor[] 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 (Reactor c : Reactor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Reactor 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
-
wrap
public static <T> Mono<T> wrap(Request<?> request, CompletableFuture<T> response, boolean propagateCancellation)
- Parameters:
request
- the request to wrap.response
- the full response to wrap, might not be the same as in the request.propagateCancellation
- if a cancelled/unsubscribed mono should also cancel the request.- Returns:
- the mono that wraps the request.
-
-