@Stability.Volatile public class ReactiveScopeEventingFunctionManager extends Object
EventingFunctions
.Constructor and Description |
---|
ReactiveScopeEventingFunctionManager(AsyncScopeEventingFunctionManager asyncManager)
Creates a new
ReactiveScopeEventingFunctionManager . |
Modifier and Type | Method and Description |
---|---|
Mono<Void> |
deployFunction(String name)
Deploys an
EventingFunction identified by its name. |
Mono<Void> |
deployFunction(String name,
DeployFunctionOptions options)
Deploys an
EventingFunction identified by its name with custom options. |
Mono<Void> |
dropFunction(String name)
Removes a
EventingFunction by its name if it exists. |
Mono<Void> |
dropFunction(String name,
DropFunctionOptions options)
Removes a
EventingFunction by its name if it exists with custom options. |
Mono<EventingStatus> |
functionsStatus()
Retrieves helpful status information about all functions currently created on the cluster.
|
Mono<EventingStatus> |
functionsStatus(FunctionsStatusOptions options)
Retrieves helpful status information about all functions currently created on the cluster with custom options.
|
Flux<EventingFunction> |
getAllFunctions()
Retrieves all
EventingFunctions currently stored on the server. |
Flux<EventingFunction> |
getAllFunctions(GetAllFunctionsOptions options)
Retrieves all
EventingFunctions currently stored on the server with custom options. |
Mono<EventingFunction> |
getFunction(String name)
Retrieves a
EventingFunction by its name. |
Mono<EventingFunction> |
getFunction(String name,
GetFunctionOptions options)
Retrieves a
EventingFunction by its name with custom options. |
Mono<Void> |
pauseFunction(String name)
Pauses an
EventingFunction identified by its name. |
Mono<Void> |
pauseFunction(String name,
PauseFunctionOptions options)
Pauses an
EventingFunction identified by its name with custom options. |
Mono<Void> |
resumeFunction(String name)
Resumes an
EventingFunction identified by its name. |
Mono<Void> |
resumeFunction(String name,
ResumeFunctionOptions options)
Resumes an
EventingFunction identified by its name with custom options. |
Mono<Void> |
undeployFunction(String name)
Undeploys an
EventingFunction identified by its name. |
Mono<Void> |
undeployFunction(String name,
UndeployFunctionOptions options)
Undeploys an
EventingFunction identified by its name with custom options. |
Mono<Void> |
upsertFunction(EventingFunction function)
Inserts or replaces a
EventingFunction . |
Mono<Void> |
upsertFunction(EventingFunction function,
UpsertFunctionOptions options)
Inserts or replaces a
EventingFunction with custom options. |
@Stability.Internal public ReactiveScopeEventingFunctionManager(AsyncScopeEventingFunctionManager asyncManager)
ReactiveScopeEventingFunctionManager
.
This API is not intended to be called by the user directly, use ReactiveCluster.eventingFunctions()
instead.
asyncManager
- the underlying async manager that performs the ops.public Mono<Void> upsertFunction(EventingFunction function)
EventingFunction
.
The eventing management API defines that if a function is stored which name does not exist yet, it will be inserted. If the name already exists, the function will be replaced with its new equivalent and the properties changed.
Operations which change the runtime-state of a function (i.e. deploy / undeploy / pause / resume) should not
be modified through this method, but rather by using those methods directly (i.e. deployFunction(String)
).
function
- the function to be inserted or replaced.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionCompilationFailureException
- (async) if the function body cannot be compiled.com.couchbase.client.core.error.CollectionNotFoundException
- (async) if the specified collection or scope does not exist.com.couchbase.client.core.error.BucketNotFoundException
- (async) if the specified bucket does not exist.com.couchbase.client.core.error.EventingFunctionIdenticalKeyspaceException
- (async) if the source and metadata keyspace are the same.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<Void> upsertFunction(EventingFunction function, UpsertFunctionOptions options)
EventingFunction
with custom options.
The eventing management API defines that if a function is stored which name does not exist yet, it will be inserted. If the name already exists, the function will be replaced with its new equivalent and the properties changed.
Operations which change the runtime-state of a function (i.e. deploy / undeploy / pause / resume) should not
be modified through this method, but rather by using those methods directly (i.e. deployFunction(String)
).
function
- the function to be inserted or replaced.options
- the custom options to apply.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionCompilationFailureException
- (async) if the function body cannot be compiled.com.couchbase.client.core.error.CollectionNotFoundException
- (async) if the specified collection or scope does not exist.com.couchbase.client.core.error.BucketNotFoundException
- (async) if the specified bucket does not exist.com.couchbase.client.core.error.EventingFunctionIdenticalKeyspaceException
- (async) if the source and metadata keyspace are the same.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<EventingFunction> getFunction(String name)
EventingFunction
by its name.name
- the name of the function to retrieve.Mono
completing with the eventing function found or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<EventingFunction> getFunction(String name, GetFunctionOptions options)
EventingFunction
by its name with custom options.name
- the name of the function to retrieve.options
- the custom options to apply.Mono
completing with the eventing function found or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Flux<EventingFunction> getAllFunctions()
EventingFunctions
currently stored on the server.
If no functions are found, an empty flux is returned.
Flux
completing with all eventing functions found or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Flux<EventingFunction> getAllFunctions(GetAllFunctionsOptions options)
EventingFunctions
currently stored on the server with custom options.
If no functions are found, an empty flux is returned.
options
- the custom options to apply.Flux
completing with all eventing functions found or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<Void> dropFunction(String name)
EventingFunction
by its name if it exists.
Note that due to a bug on the server, depending on which version is used, both a
EventingFunctionNotFoundException
or a EventingFunctionNotDeployedException
can be thrown if
a function does not exist.
name
- the name of the function to drop.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.EventingFunctionNotDeployedException
- (async) if the function is not found on the server (see above).com.couchbase.client.core.error.EventingFunctionDeployedException
- (async) if the function is currently deployed (undeploy first).com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<Void> dropFunction(String name, DropFunctionOptions options)
EventingFunction
by its name if it exists with custom options.
Note that due to a bug on the server, depending on which version is used, both a
EventingFunctionNotFoundException
or a EventingFunctionNotDeployedException
can be thrown if
a function does not exist.
name
- the name of the function to drop.options
- the custom options to apply.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.EventingFunctionNotDeployedException
- (async) if the function is not found on the server (see above).com.couchbase.client.core.error.EventingFunctionDeployedException
- (async) if the function is currently deployed (undeploy first).com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<Void> deployFunction(String name)
EventingFunction
identified by its name.
Calling this method effectively moves the function from state EventingFunctionDeploymentStatus.UNDEPLOYED
to state EventingFunctionDeploymentStatus.DEPLOYED
.
name
- the name of the function to deploy.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.EventingFunctionNotBootstrappedException
- (async) if the function is not bootstrapped yet (after creating it).com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<Void> deployFunction(String name, DeployFunctionOptions options)
EventingFunction
identified by its name with custom options.
Calling this method effectively moves the function from state EventingFunctionDeploymentStatus.UNDEPLOYED
to state EventingFunctionDeploymentStatus.DEPLOYED
.
name
- the name of the function to deploy.options
- the custom options to apply.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.EventingFunctionNotBootstrappedException
- (async) if the function is not bootstrapped yet (after creating it).com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<Void> undeployFunction(String name)
EventingFunction
identified by its name.
Calling this method effectively moves the function from state EventingFunctionDeploymentStatus.DEPLOYED
to state EventingFunctionDeploymentStatus.UNDEPLOYED
.
Note that due to a bug on the server, depending on which version is used, both a
EventingFunctionNotFoundException
or a EventingFunctionNotDeployedException
can be thrown if
a function does not exist.
name
- the name of the function to undeploy.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.EventingFunctionNotDeployedException
- (async) if the function is not found on the server (see above).com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<Void> undeployFunction(String name, UndeployFunctionOptions options)
EventingFunction
identified by its name with custom options.
Calling this method effectively moves the function from state EventingFunctionDeploymentStatus.DEPLOYED
to state EventingFunctionDeploymentStatus.UNDEPLOYED
.
Note that due to a bug on the server, depending on which version is used, both a
EventingFunctionNotFoundException
or a EventingFunctionNotDeployedException
can be thrown if
a function does not exist.
name
- the name of the function to undeploy.options
- the custom options to apply.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.EventingFunctionNotDeployedException
- (async) if the function is not found on the server (see above).com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<Void> pauseFunction(String name)
EventingFunction
identified by its name.
Calling this method effectively moves the function from state EventingFunctionProcessingStatus.RUNNING
to state EventingFunctionProcessingStatus.PAUSED
.
name
- the name of the function to pause.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.EventingFunctionNotBootstrappedException
- (async) if the function is not bootstrapped yet (after creating it).com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<Void> pauseFunction(String name, PauseFunctionOptions options)
EventingFunction
identified by its name with custom options.
Calling this method effectively moves the function from state EventingFunctionProcessingStatus.RUNNING
to state EventingFunctionProcessingStatus.PAUSED
.
name
- the name of the function to pause.options
- the custom options to apply.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.EventingFunctionNotBootstrappedException
- (async) if the function is not bootstrapped yet (after creating it).com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<Void> resumeFunction(String name)
EventingFunction
identified by its name.
Calling this method effectively moves the function from state EventingFunctionProcessingStatus.PAUSED
to state EventingFunctionProcessingStatus.RUNNING
.
Note that due to a bug on the server, depending on which version is used, both a
EventingFunctionNotFoundException
or a EventingFunctionNotDeployedException
can be thrown if
a function does not exist.
name
- the name of the function to resume.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.EventingFunctionNotDeployedException
- (async) if the function is not found on the server (see above).com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<Void> resumeFunction(String name, ResumeFunctionOptions options)
EventingFunction
identified by its name with custom options.
Calling this method effectively moves the function from state EventingFunctionProcessingStatus.PAUSED
to state EventingFunctionProcessingStatus.RUNNING
.
Note that due to a bug on the server, depending on which version is used, both a
EventingFunctionNotFoundException
or a EventingFunctionNotDeployedException
can be thrown if
a function does not exist.
name
- the name of the function to resume.options
- the custom options to apply.Mono
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.EventingFunctionNotFoundException
- (async) if the function is not found on the server.com.couchbase.client.core.error.EventingFunctionNotDeployedException
- (async) if the function is not found on the server (see above).com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<EventingStatus> functionsStatus()
Mono
completing with the eventing status or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public Mono<EventingStatus> functionsStatus(FunctionsStatusOptions options)
options
- the custom options to apply.Mono
completing with the eventing status or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.Copyright © 2024 Couchbase, Inc.. All rights reserved.