public class KurrentDBProjectionManagementClient
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletableFuture |
abort(java.lang.String projectionName)
Stops the projection without writing a checkpoint.
|
java.util.concurrent.CompletableFuture |
abort(java.lang.String projectionName,
AbortProjectionOptions options)
Stops the projection without writing a checkpoint.
|
static KurrentDBProjectionManagementClient |
create(KurrentDBClientSettings settings)
Returns the Projection Management client based on the settings.
|
java.util.concurrent.CompletableFuture |
create(java.lang.String projectionName,
java.lang.String query)
Creates a new projection in the stopped state.
|
java.util.concurrent.CompletableFuture |
create(java.lang.String projectionName,
java.lang.String query,
CreateProjectionOptions options)
Creates a new projection in the stopped state.
|
java.util.concurrent.CompletableFuture |
delete(java.lang.String projectionName)
Deletes the projection.
|
java.util.concurrent.CompletableFuture |
delete(java.lang.String projectionName,
DeleteProjectionOptions options)
Deletes the projection.
|
java.util.concurrent.CompletableFuture |
disable(java.lang.String projectionName)
Disables the projection.
|
java.util.concurrent.CompletableFuture |
disable(java.lang.String projectionName,
DisableProjectionOptions options)
Disables the projection.
|
java.util.concurrent.CompletableFuture |
enable(java.lang.String projectionName)
Enables the projection.
|
java.util.concurrent.CompletableFuture |
enable(java.lang.String projectionName,
EnableProjectionOptions options)
Enables the projection.
|
static KurrentDBProjectionManagementClient |
from(KurrentDBClientBase existingClient)
Returns a Projection Management client based on existing client.
|
<TResult> java.util.concurrent.CompletableFuture<TResult> |
getResult(java.lang.String projectionName,
java.lang.Class<TResult> type)
Gets the projection's result.
|
<TResult> java.util.concurrent.CompletableFuture<TResult> |
getResult(java.lang.String projectionName,
java.lang.Class<TResult> type,
GetProjectionResultOptions options)
Gets the projection's result.
|
<TResult> java.util.concurrent.CompletableFuture<TResult> |
getResult(java.lang.String projectionName,
java.util.function.Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> javaTypeFunction)
Gets the projection's result.
|
<TResult> java.util.concurrent.CompletableFuture<TResult> |
getResult(java.lang.String projectionName,
java.util.function.Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> javaTypeFunction,
GetProjectionResultOptions options)
Gets the projection's result.
|
<TResult> java.util.concurrent.CompletableFuture<TResult> |
getState(java.lang.String projectionName,
java.lang.Class<TResult> type)
Gets the state of the projection.
|
<TResult> java.util.concurrent.CompletableFuture<TResult> |
getState(java.lang.String projectionName,
java.lang.Class<TResult> type,
GetProjectionStateOptions options)
Gets the state of the projection.
|
<TResult> java.util.concurrent.CompletableFuture<TResult> |
getState(java.lang.String projectionName,
java.util.function.Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> javaTypeFunction)
Gets the state of the projection.
|
<TResult> java.util.concurrent.CompletableFuture<TResult> |
getState(java.lang.String projectionName,
java.util.function.Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> javaTypeFunction,
GetProjectionStateOptions options)
Gets the state of the projection.
|
java.util.concurrent.CompletableFuture<ProjectionDetails> |
getStatistics(java.lang.String projectionName)
Gets the statistics for the projection.
|
java.util.concurrent.CompletableFuture<ProjectionDetails> |
getStatistics(java.lang.String projectionName,
GetProjectionStatisticsOptions options)
Gets the statistics for the projection.
|
java.util.concurrent.CompletableFuture<ProjectionDetails> |
getStatus(java.lang.String projectionName)
Gets the projection's current status.
|
java.util.concurrent.CompletableFuture<ProjectionDetails> |
getStatus(java.lang.String projectionName,
GetProjectionStatusOptions options)
Gets the projection's current status.
|
boolean |
isShutdown()
Checks if this client instance has been shutdown.
|
java.util.concurrent.CompletableFuture<java.util.List<ProjectionDetails>> |
list()
Lists all continuous projections.
|
java.util.concurrent.CompletableFuture<java.util.List<ProjectionDetails>> |
list(ListProjectionsOptions options)
Lists all continuous projections.
|
java.util.concurrent.CompletableFuture |
reset(java.lang.String projectionName)
Resets the projection, causing it to start again from the beginning of the stream/s it selects from.
|
java.util.concurrent.CompletableFuture |
reset(java.lang.String projectionName,
ResetProjectionOptions options)
Resets the projection, causing it to start again from the beginning of the stream/s it selects from.
|
java.util.concurrent.CompletableFuture |
restartSubsystem()
Restarts the projection subsystem.
|
java.util.concurrent.CompletableFuture |
restartSubsystem(RestartProjectionSubsystemOptions options)
Restarts the projection subsystem.
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
shutdown()
Closes a connection and cleans all its allocated resources.
|
java.util.concurrent.CompletableFuture |
update(java.lang.String projectionName,
java.lang.String query)
Updates the projection's query and emit options.
|
java.util.concurrent.CompletableFuture |
update(java.lang.String projectionName,
java.lang.String query,
UpdateProjectionOptions options)
Updates the projection's query and emit options.
|
public static KurrentDBProjectionManagementClient create(KurrentDBClientSettings settings)
settings - The settings to use for constructing the client.public static KurrentDBProjectionManagementClient from(KurrentDBClientBase existingClient)
existingClient - Existing client.public java.util.concurrent.CompletableFuture abort(java.lang.String projectionName)
projectionName - Name of the projection.public java.util.concurrent.CompletableFuture abort(java.lang.String projectionName,
AbortProjectionOptions options)
projectionName - Name of the projection.options - Additional options.public java.util.concurrent.CompletableFuture create(java.lang.String projectionName,
java.lang.String query)
projectionName - Name of the projection.query - The JavaScript projection.public java.util.concurrent.CompletableFuture create(java.lang.String projectionName,
java.lang.String query,
CreateProjectionOptions options)
projectionName - Name of the projection.query - The JavaScript projection.options - Additional options.public java.util.concurrent.CompletableFuture enable(java.lang.String projectionName)
projectionName - Name of the projection.public java.util.concurrent.CompletableFuture enable(java.lang.String projectionName,
EnableProjectionOptions options)
projectionName - Name of the projection.options - Additional options.public java.util.concurrent.CompletableFuture delete(java.lang.String projectionName)
projectionName - Name of the projection.public java.util.concurrent.CompletableFuture delete(java.lang.String projectionName,
DeleteProjectionOptions options)
projectionName - Name of the projection.options - Additional options.public java.util.concurrent.CompletableFuture disable(java.lang.String projectionName)
projectionName - Name of the projection.public java.util.concurrent.CompletableFuture disable(java.lang.String projectionName,
DisableProjectionOptions options)
projectionName - Name of the projection.options - Additional options.public <TResult> java.util.concurrent.CompletableFuture<TResult> getResult(java.lang.String projectionName,
java.lang.Class<TResult> type)
TResult - The result type to return.projectionName - Name of the projection.type - Type of the class to construct for the result.public <TResult> java.util.concurrent.CompletableFuture<TResult> getResult(java.lang.String projectionName,
java.lang.Class<TResult> type,
GetProjectionResultOptions options)
TResult - The result type to return.projectionName - Name of the projection.type - Type of the class to construct for the result.public <TResult> java.util.concurrent.CompletableFuture<TResult> getResult(java.lang.String projectionName,
java.util.function.Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> javaTypeFunction)
TResult - The result type to return.projectionName - Name of the projection.javaTypeFunction - Factory method for constructing the return type.public <TResult> java.util.concurrent.CompletableFuture<TResult> getResult(java.lang.String projectionName,
java.util.function.Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> javaTypeFunction,
GetProjectionResultOptions options)
TResult - The result type to return.projectionName - Name of the projection.javaTypeFunction - Factory method for constructing the return type.public <TResult> java.util.concurrent.CompletableFuture<TResult> getState(java.lang.String projectionName,
java.lang.Class<TResult> type)
TResult - The result type to return.projectionName - Name of the projection.type - Type of the class to construct for the result.public <TResult> java.util.concurrent.CompletableFuture<TResult> getState(java.lang.String projectionName,
java.lang.Class<TResult> type,
GetProjectionStateOptions options)
TResult - The result type to return.projectionName - Name of the projection.type - Type of the class to construct for the result.public <TResult> java.util.concurrent.CompletableFuture<TResult> getState(java.lang.String projectionName,
java.util.function.Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> javaTypeFunction)
TResult - The result type to return.projectionName - Name of the projection.javaTypeFunction - Factory method for constructing the return type.public <TResult> java.util.concurrent.CompletableFuture<TResult> getState(java.lang.String projectionName,
java.util.function.Function<com.fasterxml.jackson.databind.type.TypeFactory,com.fasterxml.jackson.databind.JavaType> javaTypeFunction,
GetProjectionStateOptions options)
TResult - The result type to return.projectionName - Name of the projection.javaTypeFunction - Factory method for constructing the return type.public java.util.concurrent.CompletableFuture<ProjectionDetails> getStatistics(java.lang.String projectionName)
projectionName - Name of the projection.public java.util.concurrent.CompletableFuture<ProjectionDetails> getStatistics(java.lang.String projectionName, GetProjectionStatisticsOptions options)
projectionName - Name of the projection.options - Additional options.public java.util.concurrent.CompletableFuture<ProjectionDetails> getStatus(java.lang.String projectionName)
projectionName - Name of the projection.public java.util.concurrent.CompletableFuture<ProjectionDetails> getStatus(java.lang.String projectionName, GetProjectionStatusOptions options)
projectionName - Name of the projection.options - Additional options.public java.util.concurrent.CompletableFuture<java.util.List<ProjectionDetails>> list()
public java.util.concurrent.CompletableFuture<java.util.List<ProjectionDetails>> list(ListProjectionsOptions options)
options - Additional options.public java.util.concurrent.CompletableFuture reset(java.lang.String projectionName)
projectionName - Name of the projection.public java.util.concurrent.CompletableFuture reset(java.lang.String projectionName,
ResetProjectionOptions options)
projectionName - Name of the projection.options - Additional options.public java.util.concurrent.CompletableFuture restartSubsystem()
public java.util.concurrent.CompletableFuture restartSubsystem(RestartProjectionSubsystemOptions options)
options - Additional options.public java.util.concurrent.CompletableFuture update(java.lang.String projectionName,
java.lang.String query)
projectionName - Name of the projection.query - The JavaScript projection.public java.util.concurrent.CompletableFuture update(java.lang.String projectionName,
java.lang.String query,
UpdateProjectionOptions options)
projectionName - Name of the projection.query - The JavaScript projection.options - Additional options.public java.util.concurrent.CompletableFuture<java.lang.Void> shutdown()
public boolean isShutdown()
true if client instance has been shutdown.