Class CoreProtostellarAccessors
java.lang.Object
com.couchbase.client.core.protostellar.CoreProtostellarAccessors
Used to generically handle the core functionality of sending a GRPC request over Protostellar and handling the response.
Can handle any single-request-single-response setup, e.g. KV, collection management, etc.
Does not handle streaming. for that.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <TSdkResult,
TGrpcRequest, TGrpcResponse>
CoreAsyncResponse<TSdkResult>async
(CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse) Convenience overload that uses the default exception handling.static <TSdkResult,
TGrpcRequest, TGrpcResponse>
CoreAsyncResponse<TSdkResult>async
(CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse, Function<Throwable, ProtostellarRequestBehaviour> convertException) static <TSdkResult,
TGrpcRequest, TGrpcResponse>
voidasyncInternal
(CompletableFuture<TSdkResult> ret, CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse, Function<Throwable, ProtostellarRequestBehaviour> convertException) static <TSdkResult,
TGrpcRequest, TGrpcResponse>
TSdkResultblocking
(CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, TGrpcResponse> executeBlockingGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse) Convenience overload that uses the default exception handling.static <TSdkResult,
TGrpcRequest, TGrpcResponse>
TSdkResultblocking
(CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, TGrpcResponse> executeBlockingGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse, Function<Throwable, ProtostellarRequestBehaviour> convertException) static <TSdkResult,
TGrpcRequest, TGrpcResponse>
Mono<TSdkResult>reactive
(CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse) Convenience overload that uses the default exception handling.static <TSdkResult,
TGrpcRequest, TGrpcResponse>
Mono<TSdkResult>reactive
(CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse, Function<Throwable, ProtostellarRequestBehaviour> convertException) static <TSdkResult,
TGrpcRequest, TGrpcResponse>
voidreactiveInternal
(Sinks.One<TSdkResult> ret, CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse, Function<Throwable, ProtostellarRequestBehaviour> convertException) This method must always be called at Reactive runtime, not build-time (e.g., inside a Mono.defer or similar).
-
Constructor Details
-
CoreProtostellarAccessors
public CoreProtostellarAccessors()
-
-
Method Details
-
blocking
public static <TSdkResult,TGrpcRequest, TSdkResult blockingTGrpcResponse> (CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, TGrpcResponse> executeBlockingGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse) Convenience overload that uses the default exception handling. -
blocking
public static <TSdkResult,TGrpcRequest, TSdkResult blockingTGrpcResponse> (CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, TGrpcResponse> executeBlockingGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse, Function<Throwable, ProtostellarRequestBehaviour> convertException) - Type Parameters:
TSdkResult
- e.g. MutationResultTGrpcResponse
- e.g. com.couchbase.client.protostellar.kv.v1.InsertResponse
-
async
public static <TSdkResult,TGrpcRequest, CoreAsyncResponse<TSdkResult> asyncTGrpcResponse> (CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse) Convenience overload that uses the default exception handling. -
async
public static <TSdkResult,TGrpcRequest, CoreAsyncResponse<TSdkResult> asyncTGrpcResponse> (CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse, Function<Throwable, ProtostellarRequestBehaviour> convertException) -
asyncInternal
public static <TSdkResult,TGrpcRequest, void asyncInternalTGrpcResponse> (CompletableFuture<TSdkResult> ret, CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse, Function<Throwable, ProtostellarRequestBehaviour> convertException) -
reactive
public static <TSdkResult,TGrpcRequest, Mono<TSdkResult> reactiveTGrpcResponse> (CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse) Convenience overload that uses the default exception handling. -
reactive
public static <TSdkResult,TGrpcRequest, Mono<TSdkResult> reactiveTGrpcResponse> (CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse, Function<Throwable, ProtostellarRequestBehaviour> convertException) -
reactiveInternal
public static <TSdkResult,TGrpcRequest, void reactiveInternalTGrpcResponse> (Sinks.One<TSdkResult> ret, CoreProtostellar core, ProtostellarRequest<TGrpcRequest> request, Function<ProtostellarEndpoint, com.couchbase.client.core.deps.com.google.common.util.concurrent.ListenableFuture<TGrpcResponse>> executeFutureGrpcCall, Function<TGrpcResponse, TSdkResult> convertResponse, Function<Throwable, ProtostellarRequestBehaviour> convertException) This method must always be called at Reactive runtime, not build-time (e.g., inside a Mono.defer or similar).
-