-
- * The engine version is pinned at create time and cannot be changed via update.
- * V2 has limitations versus V1: {@code trackEmittedStreams} is rejected,
- * result streams are not emitted, and bi-state projections are not supported.
- *
- * @throws IllegalArgumentException if {@code value} is not {@code 0}, {@code 1}, or {@code 2}.
- */
- public CreateProjectionOptions engineVersion(int value) {
- if (value < 0 || value > 2) {
- throw new IllegalArgumentException(
- "engineVersion must be 0, 1, or 2 (got " + value + ")");
- }
- this.engineVersion = value;
- return this;
- }
}
diff --git a/src/main/java/io/kurrent/dbclient/CustomAclCodec.java b/src/main/java/io/trogonstack/eventstore/client/CustomAclCodec.java
similarity index 98%
rename from src/main/java/io/kurrent/dbclient/CustomAclCodec.java
rename to src/main/java/io/trogonstack/eventstore/client/CustomAclCodec.java
index 4d25b6f..3b53a55 100644
--- a/src/main/java/io/kurrent/dbclient/CustomAclCodec.java
+++ b/src/main/java/io/trogonstack/eventstore/client/CustomAclCodec.java
@@ -1,4 +1,4 @@
-package io.kurrent.dbclient;
+package io.trogonstack.eventstore.client;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser;
diff --git a/src/main/java/io/kurrent/dbclient/DeletePersistentSubscriptionOptions.java b/src/main/java/io/trogonstack/eventstore/client/DeletePersistentSubscriptionOptions.java
similarity index 90%
rename from src/main/java/io/kurrent/dbclient/DeletePersistentSubscriptionOptions.java
rename to src/main/java/io/trogonstack/eventstore/client/DeletePersistentSubscriptionOptions.java
index 7cce208..87c5391 100644
--- a/src/main/java/io/kurrent/dbclient/DeletePersistentSubscriptionOptions.java
+++ b/src/main/java/io/trogonstack/eventstore/client/DeletePersistentSubscriptionOptions.java
@@ -1,16 +1,16 @@
-package io.kurrent.dbclient;
-
-/**
- * Options of the delete persistent subscription request.
- */
-public class DeletePersistentSubscriptionOptions extends OptionsBase
*
- * The KurrentDB server will assure idempotency for all requests using any value in ExpectedRevision except
- * ANY. When using ANY, the EventStoreDB server will do its best to assure idempotency but will not
+ * The TrogonEventStore server will assure idempotency for all requests using any value in ExpectedRevision except
+ * ANY. When using ANY, TrogonEventStore will do its best to assure idempotency but will not
* guarantee it. Any other ExpectedRevision instances are meant for optimistic concurrency checks.
* Consistency checks are decoupled from writes: a check can reference any stream,
- * whether or not the request writes to it. This enables Dynamic Consistency Boundary
- * (DCB) patterns.
- * Persistent subscriptions are special kind of subscription where the server remembers the state of the
- * subscription. This allows for many different modes of operations compared to a regular or catchup subscription
- * where the client holds the subscription state. Persistent subscriptions don't guarantee ordering and unlike
- * catchup-subscriptions, they start from the end of stream by default.
- *
- * Persistent subscriptions are special kind of subscription where the server remembers the state of the
- * subscription. This allows for many different modes of operations compared to a regular or catchup subscription
- * where the client holds the subscription state. Persistent subscriptions don't guarantee ordering and unlike
- * catchup-subscriptions, they start from the end of stream by default.
- *
- * Persistent subscriptions are special kind of subscription where the server remembers the state of the
- * subscription. This allows for many different modes of operations compared to a regular or catchup subscription
- * where the client holds the subscription state. Persistent subscriptions don't guarantee ordering and unlike
- * catchup-subscriptions, they start from the end of stream by default.
- *
- * Persistent subscriptions are special kind of subscription where the server remembers the state of the
- * subscription. This allows for many different modes of operations compared to a regular or catchup subscription
- * where the client holds the subscription state. Persistent subscriptions don't guarantee ordering and unlike
- * catchup-subscriptions, they start from the end of stream by default.
- *
+ * Persistent subscriptions are special kind of subscription where the server remembers the state of the
+ * subscription. This allows for many different modes of operations compared to a regular or catchup subscription
+ * where the client holds the subscription state. Persistent subscriptions don't guarantee ordering and unlike
+ * catchup-subscriptions, they start from the end of stream by default.
+ *
+ * Persistent subscriptions are special kind of subscription where the server remembers the state of the
+ * subscription. This allows for many different modes of operations compared to a regular or catchup subscription
+ * where the client holds the subscription state. Persistent subscriptions don't guarantee ordering and unlike
+ * catchup-subscriptions, they start from the end of stream by default.
+ *
+ * Persistent subscriptions are special kind of subscription where the server remembers the state of the
+ * subscription. This allows for many different modes of operations compared to a regular or catchup subscription
+ * where the client holds the subscription state. Persistent subscriptions don't guarantee ordering and unlike
+ * catchup-subscriptions, they start from the end of stream by default.
+ *
+ * Persistent subscriptions are special kind of subscription where the server remembers the state of the
+ * subscription. This allows for many different modes of operations compared to a regular or catchup subscription
+ * where the client holds the subscription state. Persistent subscriptions don't guarantee ordering and unlike
+ * catchup-subscriptions, they start from the end of stream by default.
+ * , O> S configureStub(S stub, KurrentDBClientSettings settings, OptionsBase, O> S configureStub(S stub, TrogonEventStoreClientSettings settings, OptionsBase, O> S configureStub(S stub, KurrentDBClientSettings settings, OptionsBase, O> S configureStub(S stub, TrogonEventStoreClientSettings settings, OptionsBase, O> S configureStub(S stub, KurrentDBClientSettings settings, OptionsBase, O> S configureStub(S stub, TrogonEventStoreClientSettings settings, OptionsBase> execute(GrpcClient client, ListPersistentSubscriptionsOptions options, String stream, Function
@@ -24,7 +24,7 @@
*
*/
-public class KurrentDBClientSettings {
+public class TrogonEventStoreClientSettings {
private final boolean dnsDiscover;
private final int maxDiscoverAttempts;
private final int discoveryInterval;
@@ -167,7 +167,7 @@ public String getTlsCaFile() {
*/
public Set> listAll(ListPersistentSubscriptionsOptions options) {
- return ListPersistentSubscriptions.execute(inner.getGrpcClient(), options, "", Function.identity());
- }
-
- /**
- * Lists all existing persistent subscriptions.
-
- * @see PersistentSubscriptionInfo
- */
- public CompletableFuture
> listAll() {
- return listAll(ListPersistentSubscriptionsOptions.get());
- }
-
- /**
- * Lists all persistent subscriptions of a specific stream.
- * @param stream stream's name.
- * @param options list persistent subscriptions request's options.
- */
- public CompletableFuture
> listToStream(String stream, ListPersistentSubscriptionsOptions options) {
- return ListPersistentSubscriptions.execute(inner.getGrpcClient(), options, stream, info -> (PersistentSubscriptionToStreamInfo) info);
- }
-
- /**
- * Lists all persistent subscriptions of a specific stream.
- * @param stream stream's name.
- * @see PersistentSubscriptionToStreamInfo
- */
- public CompletableFuture
> listToStream(String stream) {
- return listToStream(stream, ListPersistentSubscriptionsOptions.get());
- }
-
- /**
- * Lists all persistent subscriptions of a specific to the $all stream.
- * @see PersistentSubscriptionToAllInfo
- */
- public CompletableFuture
> listToAll() {
- return listToAll(ListPersistentSubscriptionsOptions.get());
- }
-
- /**
- * Lists all persistent subscriptions of a specific to the $all stream.
- * @param options list persistent subscriptions request's options.
- * @see PersistentSubscriptionToAllInfo
- */
- public CompletableFuture
> listToAll(ListPersistentSubscriptionsOptions options) {
- return ListPersistentSubscriptions.execute(inner.getGrpcClient(), options, "$all", info -> (PersistentSubscriptionToAllInfo) info);
- }
-
- /**
- * Gets a specific persistent subscription info.
- * @param stream stream's name.
- * @param groupName group's name.
- * @param options get persistent subscription info request's options.
- * @see PersistentSubscriptionInfo
- */
- public CompletableFuture
> listAll(ListPersistentSubscriptionsOptions options) {
+ return ListPersistentSubscriptions.execute(inner.getGrpcClient(), options, "", Function.identity());
+ }
+
+ /**
+ * Lists all existing persistent subscriptions.
+
+ * @see PersistentSubscriptionInfo
+ */
+ public CompletableFuture
> listAll() {
+ return listAll(ListPersistentSubscriptionsOptions.get());
+ }
+
+ /**
+ * Lists all persistent subscriptions of a specific stream.
+ * @param stream stream's name.
+ * @param options list persistent subscriptions request's options.
+ */
+ public CompletableFuture
> listToStream(String stream, ListPersistentSubscriptionsOptions options) {
+ return ListPersistentSubscriptions.execute(inner.getGrpcClient(), options, stream, info -> (PersistentSubscriptionToStreamInfo) info);
+ }
+
+ /**
+ * Lists all persistent subscriptions of a specific stream.
+ * @param stream stream's name.
+ * @see PersistentSubscriptionToStreamInfo
+ */
+ public CompletableFuture
> listToStream(String stream) {
+ return listToStream(stream, ListPersistentSubscriptionsOptions.get());
+ }
+
+ /**
+ * Lists all persistent subscriptions of a specific to the $all stream.
+ * @see PersistentSubscriptionToAllInfo
+ */
+ public CompletableFuture
> listToAll() {
+ return listToAll(ListPersistentSubscriptionsOptions.get());
+ }
+
+ /**
+ * Lists all persistent subscriptions of a specific to the $all stream.
+ * @param options list persistent subscriptions request's options.
+ * @see PersistentSubscriptionToAllInfo
+ */
+ public CompletableFuture
> listToAll(ListPersistentSubscriptionsOptions options) {
+ return ListPersistentSubscriptions.execute(inner.getGrpcClient(), options, "$all", info -> (PersistentSubscriptionToAllInfo) info);
+ }
+
+ /**
+ * Gets a specific persistent subscription info.
+ * @param stream stream's name.
+ * @param groupName group's name.
+ * @param options get persistent subscription info request's options.
+ * @see PersistentSubscriptionInfo
+ */
+ public CompletableFuture
> list() {
- return list(ListProjectionsOptions.get());
- }
-
- /**
- * Lists all continuous projections.
- * @param options Additional options.
- */
- public CompletableFuture
> list(ListProjectionsOptions options) {
- return new ListProjections(inner.getGrpcClient(), options).execute().thenApply(ListProjectionsResult::getProjections);
- }
-
- /**
- * Resets the projection, causing it to start again from the beginning of the stream/s it selects from.
- * Resetting a projection will truncate all emitted streams and re-emit all events.
- * @param projectionName Name of the projection.
- */
- public CompletableFuture reset(final String projectionName) {
- return this.reset(projectionName, ResetProjectionOptions.get());
- }
-
- /**
- * Resets the projection, causing it to start again from the beginning of the stream/s it selects from.
- * Resetting a projection will truncate all emitted streams and re-emit all events.
- * @param projectionName Name of the projection.
- * @param options Additional options.
- */
- public CompletableFuture reset(final String projectionName, ResetProjectionOptions options) {
- return new ResetProjection(inner.getGrpcClient(), projectionName, options).execute();
- }
-
- /**
- * Restarts the projection subsystem. This can be used to recover from certain kinds of errors.
- */
- public CompletableFuture restartSubsystem() {
- return this.restartSubsystem(RestartProjectionSubsystemOptions.get());
- }
-
- /**
- * Restarts the projection subsystem. This can be used to recover from certain kinds of errors.
- * @param options Additional options.
- */
- public CompletableFuture restartSubsystem(RestartProjectionSubsystemOptions options) {
- return new RestartProjectionSubsystem(inner.getGrpcClient(), options).execute();
- }
-
- /**
- * Updates the projection's query and emit options.
- * @param projectionName Name of the projection.
- * @param query The JavaScript projection.
- */
- public CompletableFuture update(final String projectionName, final String query) {
- return this.update(projectionName, query, UpdateProjectionOptions.get());
- }
-
- /**
- * Updates the projection's query and emit options.
- * @param projectionName Name of the projection.
- * @param query The JavaScript projection.
- * @param options Additional options.
- */
- public CompletableFuture update(final String projectionName, final String query, UpdateProjectionOptions options) {
- return new UpdateProjection(inner.getGrpcClient(), projectionName, query, options).execute();
- }
-
- /**
- * Closes a connection and cleans all its allocated resources.
- */
- public CompletableFuture