\"FRM\" at column 10. "
17 | }
18 | ],
19 | "status":"fatal",
20 | "metrics":{
21 | "elapsedTime":"161.673835ms",
22 | "executionTime":"135.564047ms",
23 | "resultCount":0,
24 | "resultSize":0,
25 | "processedObjects":0,
26 | "errorCount":1
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/scala-client/src/main/scala-2/com/couchbase/client/scala/env/package.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.scala
17 |
18 | import com.couchbase.client.core.env.CoreEnvironment.Builder
19 |
20 | package object env {
21 | private[scala] type JavaCoreEnvBuilder[SELF] = Builder[SELF] forSome {
22 | type SELF <: Builder[SELF]
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/msg/UnmonitoredRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.msg;
18 |
19 | /**
20 | * Requests implementing this interface will not be reported in various places.
21 | *
22 | * Since they fly "under the radar", use with care!
23 | */
24 | public interface UnmonitoredRequest {
25 | }
26 |
--------------------------------------------------------------------------------
/scala-client/src/test/resources/sdk-testcases/analytics/syntax-error-24000.json:
--------------------------------------------------------------------------------
1 | {
2 | "metadata": {
3 | "http_status": 400,
4 | "description": "This case is representative of an analytics query request containing a syntax error.",
5 | "reproduction": "Send an analytics query request to the server containing a statement with a syntax error.",
6 | "server_version": "6.0.1"
7 | },
8 | "data": {
9 | "requestID":"eb8a8d08-9e25-4473-81f8-6565c51a43d9",
10 | "signature":{
11 | "*":"*"
12 | },
13 | "errors":[
14 | {
15 | "code":24000,
16 | "msg":"Syntax error: In line 1 >>SELECT * FRM `travel-sample`;<< Encountered \"FRM\" at column 10. "
17 | }
18 | ],
19 | "status":"fatal",
20 | "metrics":{
21 | "elapsedTime":"161.673835ms",
22 | "executionTime":"135.564047ms",
23 | "resultCount":0,
24 | "resultSize":0,
25 | "processedObjects":0,
26 | "errorCount":1
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/core-io/src/test/resources/com/couchbase/client/core/config/memcached_with_ipv6.json:
--------------------------------------------------------------------------------
1 | {"rev":23,"name":"cache","uri":"/pools/default/buckets/cache?bucket_uuid=3d182425867483f45fa6feb105661af1","streamingUri":"/pools/default/bucketsStreaming/cache?bucket_uuid=3d182425867483f45fa6feb105661af1","nodes":[{"hostname":"[fd63:6f75:6368:2068:1471:75ff:fe25:a8be]:8091","ports":{"proxy":11211,"direct":11210}},{"hostname":"[fd63:6f75:6368:2068:c490:b5ff:fe86:9cf7]:8091","ports":{"proxy":11211,"direct":11210}}],"nodesExt":[{"services":{"mgmt":8091,"mgmtSSL":18091,"capiSSL":18092,"capi":8092,"kvSSL":11207,"projector":9999,"kv":11210,"moxi":11211},"hostname":"fd63:6f75:6368:2068:1471:75ff:fe25:a8be"},{"services":{"mgmt":8091,"mgmtSSL":18091,"capiSSL":18092,"capi":8092,"kvSSL":11207,"projector":9999,"kv":11210,"moxi":11211},"thisNode":true,"hostname":"fd63:6f75:6368:2068:c490:b5ff:fe86:9cf7"}],"nodeLocator":"ketama","uuid":"3d182425867483f45fa6feb105661af1","bucketCapabilitiesVer":"","bucketCapabilities":["xattr","cbhello","nodesExt"]}
--------------------------------------------------------------------------------
/scala-client/src/main/scala-3/com/couchbase/client/scala/Bucket.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.scala
17 |
18 | /** Represents a Couchbase bucket resource.
19 | *
20 | * Applications should not create these manually, but instead use the functions in [[Cluster]].
21 | */
22 | class Bucket private[scala] (val async: AsyncBucket) extends BucketBase {}
23 |
--------------------------------------------------------------------------------
/scala-client/src/main/scala-2/com/couchbase/client/scala/manager/view/DesignDocument.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.scala.manager.view
17 |
18 | case class DesignDocument(name: String, views: collection.Map[String, View] = Map()) {
19 | def putView(name: String, view: View): DesignDocument = {
20 | copy(views = views + (name -> view))
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/columnar-java-client/src/main/java/com/couchbase/columnar/client/java/codec/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Classes that turn query result rows into Java objects
19 | * when you call {@code row.as(Class)} or {@code row.as(TypeRef)}.
20 | */
21 | @NullMarked
22 | package com.couchbase.columnar.client.java.codec;
23 |
24 | import org.jspecify.annotations.NullMarked;
25 |
--------------------------------------------------------------------------------
/core-io/src/test/java/com/couchbase/client/core/protostellar/util/CoreTestEnvironment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.protostellar.util;
17 |
18 | import com.couchbase.client.core.env.CoreEnvironment;
19 |
20 | public class CoreTestEnvironment extends CoreEnvironment {
21 | public CoreTestEnvironment(Builder builder) {
22 | super(builder);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/test-utils/src/main/java/com/couchbase/client/test/Services.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.test;
17 |
18 | public enum Services {
19 | KV,
20 | KV_TLS,
21 | MANAGER,
22 | MANAGER_TLS,
23 | QUERY,
24 | QUERY_TLS,
25 | ANALYTICS,
26 | ANALYTICS_TLS,
27 | SEARCH,
28 | SEARCH_TLS,
29 | VIEW,
30 | VIEW_TLS,
31 | EVENTING,
32 | EVENTING_TLS
33 | }
34 |
--------------------------------------------------------------------------------
/kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/analytics/AnalyticsWarning.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.kotlin.analytics
18 |
19 | public class AnalyticsWarning(
20 | public val code: Int,
21 | public val message: String,
22 | ) {
23 | override fun toString(): String {
24 | return "AnalyticsWarning(code=$code, message='$message')"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/api/search/queries/CoreGeoPoint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.api.search.queries;
18 |
19 | import com.couchbase.client.core.annotation.Stability;
20 | import com.couchbase.client.core.deps.com.fasterxml.jackson.databind.JsonNode;
21 |
22 | @Stability.Internal
23 | public interface CoreGeoPoint {
24 | JsonNode toJson();
25 | }
26 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/LinkExistsException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.error;
18 |
19 | import com.couchbase.client.core.error.context.ErrorContext;
20 |
21 | public class LinkExistsException extends CouchbaseException {
22 | public LinkExistsException(final ErrorContext ctx) {
23 | super("The link already exists", ctx);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/LinkNotFoundException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.error;
18 |
19 | import com.couchbase.client.core.error.context.ErrorContext;
20 |
21 | public class LinkNotFoundException extends CouchbaseException {
22 | public LinkNotFoundException(final ErrorContext ctx) {
23 | super("The link is not found", ctx);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/transaction/getmulti/CoreGetMultiSignal.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2025 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.transaction.getmulti;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 |
20 | @Stability.Internal
21 | public enum CoreGetMultiSignal {
22 | COMPLETED,
23 | RETRY,
24 | RESET_AND_RETRY,
25 | CONTINUE,
26 | BOUND_EXCEEDED
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/scala-client/src/main/java/com/couchbase/client/scala/internal/JavadocPlaceholder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2025 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.scala.internal;
18 |
19 | /**
20 | * Empty API docs are generated for the Scala 3 build at this time, due to known incompatibilies between Maven and Scala 3:
21 | * https://github.com/davidB/scala-maven-plugin/issues/862
22 | */
23 | @Deprecated
24 | class JavadocPlaceholder {
25 | }
26 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/cnc/metrics/NoopCounter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.cnc.metrics;
18 |
19 | import com.couchbase.client.core.cnc.Counter;
20 |
21 | public class NoopCounter implements Counter {
22 |
23 | public static final NoopCounter INSTANCE = new NoopCounter();
24 |
25 | @Override
26 | public void incrementBy(long number) {
27 |
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/java-client/src/main/java/com/couchbase/client/java/json/JsonNull.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.java.json;
17 |
18 | /**
19 | * Represents the JSON form of "NULL".
20 | *
21 | * @author Michael Nitschinger
22 | * @since 2.0
23 | */
24 | public class JsonNull extends JsonValue {
25 |
26 | public static final JsonNull INSTANCE = new JsonNull();
27 |
28 | private JsonNull() {}
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/java-client/src/test/java/com/couchbase/client/java/codec/DefaultJsonSerializerTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.java.codec;
18 |
19 | class DefaultJsonSerializerTest extends JsonSerializerTestBase {
20 | private static final JsonSerializer serializer = DefaultJsonSerializer.create();
21 |
22 | @Override
23 | protected JsonSerializer serializer() {
24 | return serializer;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/scala-implicits/src/main/java/com/couchbase/client/scala/internal/JavadocPlaceholder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2025 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.scala.internal;
18 |
19 | /**
20 | * Empty API docs are generated for the Scala 3 build at this time, due to known incompatibilies between Maven and Scala 3:
21 | * https://github.com/davidB/scala-maven-plugin/issues/862
22 | */
23 | @Deprecated
24 | class JavadocPlaceholder {
25 | }
26 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/api/manager/CoreCreateQueryIndexOptions.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.api.manager;
18 |
19 | import com.couchbase.client.core.annotation.Stability;
20 |
21 | /**
22 | * Allows customizing how a query index is created.
23 | */
24 | @Stability.Internal
25 | public interface CoreCreateQueryIndexOptions extends CoreCreateQueryIndexSharedOptions {
26 | }
27 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/api/search/result/CoreSearchFacetResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.api.search.result;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 |
20 | @Stability.Internal
21 | public interface CoreSearchFacetResult {
22 | String name();
23 | String field();
24 | long total();
25 | long missing();
26 | long other();
27 | }
28 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/NoAccessDuringConfigLoadException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2024 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.error;
18 |
19 | import com.couchbase.client.core.annotation.Stability;
20 |
21 | @Stability.Internal
22 | public class NoAccessDuringConfigLoadException extends ConfigException {
23 | public NoAccessDuringConfigLoadException(String message) {
24 | super(message);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/transaction/getmulti/CoreTransactionGetMultiMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2025 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.transaction.getmulti;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 |
20 | @Stability.Internal
21 | public enum CoreTransactionGetMultiMode {
22 | PRIORITISE_LATENCY,
23 | DISABLE_READ_SKEW_DETECTION,
24 | PRIORITISE_READ_SKEW_DETECTION
25 | }
26 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 |
3 | updates:
4 | - package-ecosystem: "maven"
5 | directory: "/"
6 | schedule:
7 | interval: "daily"
8 | allow:
9 | - dependency-name: "io.netty:*"
10 | - dependency-name: "com.fasterxml.jackson.core:*"
11 | - dependency-name: "com.fasterxml.jackson.module:*"
12 | ignore:
13 | # Allow only patch updates for Netty
14 | - dependency-name: "io.netty:*"
15 | update-types:
16 | - version-update:semver-major
17 | - version-update:semver-minor
18 | - package-ecosystem: "maven"
19 | directory: "/core-io-deps"
20 | schedule:
21 | interval: "daily"
22 | allow:
23 | - dependency-name: "io.netty:*"
24 | - dependency-name: "com.fasterxml.jackson.core:*"
25 | - dependency-name: "com.fasterxml.jackson.module:*"
26 | ignore:
27 | # Allow only patch updates for Netty
28 | - dependency-name: "io.netty:*"
29 | update-types:
30 | - version-update:semver-major
31 | - version-update:semver-minor
32 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/manager/bucket/CoreCreateBucketSettings.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.manager.bucket;
18 |
19 | import com.couchbase.client.core.annotation.Stability;
20 | import reactor.util.annotation.Nullable;
21 |
22 | @Stability.Internal
23 | public interface CoreCreateBucketSettings {
24 | @Nullable
25 | CoreConflictResolutionType conflictResolutionType();
26 | }
27 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/cnc/apptelemetry/collector/Reportable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2025 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.cnc.apptelemetry.collector;
18 |
19 | import java.util.Map;
20 | import java.util.function.Consumer;
21 |
22 | interface Reportable {
23 | void reportTo(
24 | Consumer super CharSequence> charSink,
25 | Map commonTags,
26 | long currentTimeMillis
27 | );
28 | }
29 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/DatasetExistsException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.error;
18 |
19 | import com.couchbase.client.core.error.context.ErrorContext;
20 |
21 | public class DatasetExistsException extends CouchbaseException {
22 |
23 | public DatasetExistsException(final ErrorContext ctx) {
24 | super("The analytics dataset already exists", ctx);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/TooManyInstancesException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.error;
18 |
19 | /**
20 | * Raised if more SDK instances are created than allowed in configuration.
21 | */
22 | public class TooManyInstancesException extends CouchbaseException {
23 |
24 | public TooManyInstancesException(final String message) {
25 | super(message);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/transaction/getmulti/CoreGetMultiPhase.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2025 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.transaction.getmulti;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 |
20 | @Stability.Internal
21 | public enum CoreGetMultiPhase {
22 | FIRST_DOC_FETCH,
23 | SUBSEQUENT_TO_FIRST_DOC_FETCH,
24 | DISCOVERED_DOCS_IN_T1,
25 | RESOLVING_T1_ATR_ENTRY_MISSING
26 | }
27 |
--------------------------------------------------------------------------------
/java-client/src/test/resources/sdk-testcases/query/enhanced-prepared-4040.json:
--------------------------------------------------------------------------------
1 | {
2 | "metadata": {
3 | "http_status": 404,
4 | "description": "This case is representative of a response an enhanced prepared statement request which has an unknown plan.",
5 | "reproduction": "Send a enhanced prepared statement request to the server where the uuid in the prepared field is unknown to the server.",
6 | "expectation": "When enhanced prepared statements are in use then retry",
7 | "server_version": "6.5"
8 | },
9 | "data": {
10 | "requestID": "9605e383-3da3-440e-a4e1-47d4b673401f",
11 | "clientContextID": "d4c97655-2e89-41ed-a46c-9f4e2a1eae5a",
12 | "errors": [
13 | {
14 | "code": 4040,
15 | "msg": "No such prepared statement: 32f2405d-5715-5915-b2b2-d2c557da49"
16 | }
17 | ],
18 | "status": "fatal",
19 | "metrics": {
20 | "elapsedTime": "1.167435ms",
21 | "executionTime": "1.117429ms",
22 | "resultCount": 0,
23 | "resultSize": 0,
24 | "errorCount": 1
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/scala-client/src/test/resources/sdk-testcases/query/enhanced-prepared-4040.json:
--------------------------------------------------------------------------------
1 | {
2 | "metadata": {
3 | "http_status": 404,
4 | "description": "This case is representative of a response an enhanced prepared statement request which has an unknown plan.",
5 | "reproduction": "Send a enhanced prepared statement request to the server where the uuid in the prepared field is unknown to the server.",
6 | "expectation": "When enhanced prepared statements are in use then retry",
7 | "server_version": "6.5"
8 | },
9 | "data": {
10 | "requestID": "9605e383-3da3-440e-a4e1-47d4b673401f",
11 | "clientContextID": "d4c97655-2e89-41ed-a46c-9f4e2a1eae5a",
12 | "errors": [
13 | {
14 | "code": 4040,
15 | "msg": "No such prepared statement: 32f2405d-5715-5915-b2b2-d2c557da49"
16 | }
17 | ],
18 | "status": "fatal",
19 | "metrics": {
20 | "elapsedTime": "1.167435ms",
21 | "executionTime": "1.117429ms",
22 | "resultCount": 0,
23 | "resultSize": 0,
24 | "errorCount": 1
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/api/search/CoreSearchScanConsistency.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.api.search;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 |
20 | @Stability.Internal
21 | public enum CoreSearchScanConsistency {
22 | NOT_BOUNDED {
23 | @Override
24 | public String toString() {
25 | return "";
26 | }
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/DataverseExistsException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.error;
18 |
19 | import com.couchbase.client.core.error.context.ErrorContext;
20 |
21 | public class DataverseExistsException extends CouchbaseException {
22 |
23 | public DataverseExistsException(final ErrorContext ctx) {
24 | super("The analytics dataverse already exists", ctx);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/ViewNotFoundException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.error;
18 |
19 | import com.couchbase.client.core.error.context.ErrorContext;
20 |
21 | public class ViewNotFoundException extends CouchbaseException {
22 |
23 | public ViewNotFoundException(ErrorContext ctx) {
24 | super("The queried view is not found on the server", ctx);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/java-client/src/main/java/com/couchbase/client/java/manager/eventing/EventingFunctionBucketAccess.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.java.manager.eventing;
18 |
19 | /**
20 | * The bucket access policy for the bucket binding.
21 | */
22 | public enum EventingFunctionBucketAccess {
23 | /**
24 | * Read-only access.
25 | */
26 | READ_ONLY,
27 | /**
28 | * Read and write access.
29 | */
30 | READ_WRITE
31 | }
32 |
--------------------------------------------------------------------------------
/columnar-java-fit-performer/src/main/java/com/couchbase/columnar/modes/Mode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.columnar.modes;
18 |
19 | public enum Mode {
20 | /**
21 | * The executeQuery() variant that has a row callback and returns QueryMetadata.
22 | */
23 | PUSH_BASED_STREAMING,
24 |
25 | /**
26 | * The executeQuery() variant that returns a QueryResult with all rows buffered.
27 | */
28 | BUFFERED
29 | }
30 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/compression/snappy/repackaged/org/iq80/snappy/v04/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2024 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * These classes came from https://github.com/dain/snappy/ at tag "snappy-0.4".
19 | *
20 | * They have been modified to always use "SlowMemory" instead of "UnsafeMemory",
21 | * to avoid CVE-2024-36124.
22 | */
23 | package com.couchbase.client.core.compression.snappy.repackaged.org.iq80.snappy.v04;
24 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/DataverseNotFoundException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.error;
18 |
19 | import com.couchbase.client.core.error.context.ErrorContext;
20 |
21 | public class DataverseNotFoundException extends CouchbaseException {
22 |
23 | public DataverseNotFoundException(final ErrorContext ctx) {
24 | super("The analytics dataverse is not found", ctx);
25 | }
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/java-client/src/main/java/com/couchbase/client/java/env/ClusterPropertyLoader.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.java.env;
18 |
19 | import com.couchbase.client.core.env.PropertyLoader;
20 |
21 | /**
22 | * Marker interface for additional properties that can be loaded via the cluster environment builder.
23 | */
24 | public interface ClusterPropertyLoader extends PropertyLoader {
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/columnar-java-client/src/main/java/com/couchbase/columnar/client/java/internal/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Classes in this package are not part of the SDK's public API,
19 | * and may change in any way at any time.
20 | */
21 | @ApiStatus.Internal
22 | @NullMarked
23 | package com.couchbase.columnar.client.java.internal;
24 |
25 | import org.jetbrains.annotations.ApiStatus;
26 | import org.jspecify.annotations.NullMarked;
27 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/config/ConfigRefreshFailure.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.config;
18 |
19 | import com.couchbase.client.core.annotation.Stability;
20 |
21 | @Stability.Internal
22 | public enum ConfigRefreshFailure {
23 |
24 | /**
25 | * All eligible nodes have been tried when refreshing but no config was loaded.
26 | */
27 | ALL_NODES_TRIED_ONCE_WITHOUT_SUCCESS
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/transaction/internal/ForwardCompatibilityRequiresRetryException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.error.transaction.internal;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 | import com.couchbase.client.core.error.CouchbaseException;
20 |
21 | @Stability.Internal
22 | public class ForwardCompatibilityRequiresRetryException extends CouchbaseException {
23 | }
24 |
--------------------------------------------------------------------------------
/java-fit-performer/src/main/java/com/couchbase/twoway/TestFailure.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.twoway;
17 |
18 | public class TestFailure extends RuntimeException {
19 | public TestFailure(String err) {
20 | super(err);
21 | }
22 |
23 | public TestFailure(String err, Throwable cause) {
24 | super(err, cause);
25 | }
26 |
27 | public TestFailure(Throwable cause) {
28 | super(cause);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/cnc/metrics/NoopValueRecorder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.cnc.metrics;
18 |
19 | import com.couchbase.client.core.cnc.ValueRecorder;
20 |
21 | public class NoopValueRecorder implements ValueRecorder {
22 |
23 | public static final NoopValueRecorder INSTANCE = new NoopValueRecorder();
24 |
25 | @Override
26 | public void recordValue(long value) {
27 |
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/msg/TargetedRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.msg;
18 |
19 | /**
20 | * Marker interface to signal a request that can only be sent to the specified target node.
21 | * @deprecated the "target" method is now part of the Request interface,
22 | * so the TargetedRequest interface is no longer necessary.
23 | */
24 | @Deprecated
25 | public interface TargetedRequest {
26 | }
27 |
--------------------------------------------------------------------------------
/columnar-fit-performer-shared/src/main/java/com/couchbase/columnar/fit/core/util/StartTimes.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.columnar.fit.core.util;
17 |
18 | import static com.couchbase.columnar.fit.core.util.TimeUtil.getTimeNow;
19 |
20 | public record StartTimes(long asSystem, com.google.protobuf.Timestamp asWallclock) {
21 | public static StartTimes startTiming() {
22 | return new StartTimes(System.nanoTime(), getTimeNow());
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/env/RequestCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2021 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.env;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 | import com.couchbase.client.core.msg.Request;
20 |
21 | import java.util.function.Consumer;
22 |
23 | /**
24 | * Marker interface for different callbacks in the request lifecycle.
25 | */
26 | @Stability.Internal
27 | public interface RequestCallback {
28 | }
29 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/SeedNodeOutdatedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.error;
18 |
19 | /**
20 | * Used to signal that the seed node used for an operation is outdated and might need to be refreshed.
21 | */
22 | public class SeedNodeOutdatedException extends ConfigException {
23 |
24 | public SeedNodeOutdatedException(final String message) {
25 | super(message);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/columnar-java-client/examples/maven-project-template/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | wrapperVersion=3.3.2
18 | distributionType=only-script
19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip
20 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/api/search/facet/CoreTermFacet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2023 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.api.search.facet;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 | import reactor.util.annotation.Nullable;
20 |
21 | @Stability.Internal
22 | public class CoreTermFacet extends CoreSearchFacet {
23 |
24 | public CoreTermFacet(String field, @Nullable Integer limit) {
25 | super(field, limit);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
19 |
--------------------------------------------------------------------------------
/columnar-java-fit-performer/src/main/java/com/couchbase/columnar/query/ExecuteQueryStreamer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.columnar.query;
18 |
19 | public interface ExecuteQueryStreamer {
20 | fit.columnar.EmptyResultOrFailureResponse blockForQueryResult();
21 |
22 | fit.columnar.QueryRowResponse blockForRow();
23 |
24 | fit.columnar.QueryResultMetadataResponse blockForMetadata();
25 |
26 | void cancel();
27 |
28 | String queryHandle();
29 | }
30 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/transaction/internal/RetryOperationException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.error.transaction.internal;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 | import com.couchbase.client.core.error.CouchbaseException;
20 |
21 | /**
22 | * Indicates that this operation should be retried.
23 | */
24 | @Stability.Internal
25 | public class RetryOperationException extends CouchbaseException {}
26 |
--------------------------------------------------------------------------------
/java-client/src/main/java/com/couchbase/client/java/encryption/databind/jackson/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for encryption during Jackson data binding, compatible with
19 | * the standard Jackson library.
20 | *
21 | * @implNote Please keep these classes in sync with their repackaged counterparts
22 | * in {@link com.couchbase.client.java.encryption.databind.jackson.repackaged}
23 | */
24 | package com.couchbase.client.java.encryption.databind.jackson;
25 |
--------------------------------------------------------------------------------
/kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/manager/view/View.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.kotlin.manager.view
18 |
19 | import com.couchbase.client.core.logging.RedactableArgument.redactMeta
20 |
21 | public class View(
22 | public val map: String,
23 | public val reduce: String? = null,
24 | ) {
25 | override fun toString(): String {
26 | return "View(map='${redactMeta(map)}', reduce=${redactMeta(reduce)})"
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/GlobalConfigNotFoundException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.error;
18 |
19 | /**
20 | * Exception thrown if global configs are supported but the server tells the client that there is currently
21 | * non available.
22 | */
23 | public class GlobalConfigNotFoundException extends ConfigException {
24 |
25 | public GlobalConfigNotFoundException() {
26 | super();
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/transaction/TransactionAlreadyAbortedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.error.transaction;
17 |
18 | import com.couchbase.client.core.error.CouchbaseException;
19 |
20 | public class TransactionAlreadyAbortedException extends CouchbaseException {
21 | public TransactionAlreadyAbortedException() {
22 | super("An operation cannot proceed as the transaction has already aborted");
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/transaction/internal/RetryAtrCommitException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.error.transaction.internal;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 | import com.couchbase.client.core.error.CouchbaseException;
20 |
21 | /**
22 | * Indicates that committing the ATR entry should be retried.
23 | */
24 | @Stability.Internal
25 | public class RetryAtrCommitException extends CouchbaseException {}
26 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/transaction/TransactionAlreadyCommittedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.error.transaction;
17 |
18 | import com.couchbase.client.core.error.CouchbaseException;
19 |
20 | public class TransactionAlreadyCommittedException extends CouchbaseException {
21 | public TransactionAlreadyCommittedException() {
22 | super("An operation cannot proceed as the transaction has already committed");
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/kotlin-client/src/main/kotlin/com/couchbase/client/kotlin/kv/ExistsResult.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.kotlin.kv
18 |
19 | public class ExistsResult internal constructor(
20 | public val exists: Boolean,
21 | public val cas: Long,
22 | ) {
23 | override fun toString(): String {
24 | return "ExistsResult(exists=$exists, cas=$cas)"
25 | }
26 |
27 | internal companion object {
28 | val NotFound = ExistsResult(false, 0)
29 | }
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/scala-client/src/main/scala-2/com/couchbase/client/scala/manager/analytics/AnalyticsIndex.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.scala.manager.analytics
18 | import com.couchbase.client.scala.implicits.Codec
19 |
20 | case class AnalyticsIndex(
21 | name: String,
22 | datasetName: String,
23 | dataverseName: String,
24 | isPrimary: Boolean
25 | )
26 |
27 | object AnalyticsIndex {
28 | implicit val codec: Codec[AnalyticsIndex] = Codec.codec[AnalyticsIndex]
29 | }
30 |
--------------------------------------------------------------------------------
/scala-fit-performer/src/main/scala/com/couchbase/client/performer/scala/transaction/TestFailureRaiseFailedPrecondition.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2025 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.performer.scala.transaction;
17 |
18 | /**
19 | * Signals that the performer should fail the RPC with gRPC FAILED_PRECONDITION.
20 | */
21 | public class TestFailureRaiseFailedPrecondition extends TestFailure {
22 | public TestFailureRaiseFailedPrecondition(String message) {
23 | super(message);
24 | }
25 | }
26 |
27 |
28 |
--------------------------------------------------------------------------------
/core-fit-performer/src/main/java/com/couchbase/client/performer/core/util/TimeUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.performer.core.util;
17 |
18 | import com.google.protobuf.Timestamp;
19 |
20 | public class TimeUtil {
21 | public static Timestamp getTimeNow() {
22 | long millis = System.currentTimeMillis();
23 |
24 | return Timestamp.newBuilder().setSeconds(millis / 1000)
25 | .setNanos((int) ((millis % 1000) * 1000000)).build();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/MutationTokenOutdatedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2022 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.error;
17 |
18 | import com.couchbase.client.core.error.context.ErrorContext;
19 |
20 | public class MutationTokenOutdatedException extends CouchbaseException {
21 |
22 | public MutationTokenOutdatedException(final ErrorContext ctx) {
23 | super("The provided MutationToken is outdated compared to the current state of the server.", ctx);
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/msg/kv/NoopResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.msg.kv;
18 |
19 | import com.couchbase.client.core.msg.BaseResponse;
20 | import com.couchbase.client.core.msg.ResponseStatus;
21 |
22 | /**
23 | * The response of a {@link NoopRequest}.
24 | *
25 | * @since 2.0.0
26 | */
27 | public class NoopResponse extends BaseResponse {
28 |
29 | NoopResponse(ResponseStatus status) {
30 | super(status);
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/transaction/components/OperationTypes.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2022 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.transaction.components;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 |
20 | @Stability.Internal
21 | public class OperationTypes {
22 | private OperationTypes() {}
23 |
24 | public static final String INSERT = "insert";
25 | public static final String REPLACE = "replace";
26 | public static final String REMOVE = "remove";
27 | }
28 |
--------------------------------------------------------------------------------
/columnar-fit-performer-shared/src/main/java/com/couchbase/columnar/fit/core/util/TimeUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2024 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.columnar.fit.core.util;
17 |
18 | import java.time.Instant;
19 |
20 | public class TimeUtil {
21 | public static com.google.protobuf.Timestamp getTimeNow() {
22 | Instant now = Instant.now();
23 |
24 | return com.google.protobuf.Timestamp.newBuilder()
25 | .setSeconds(now.getEpochSecond())
26 | .setNanos(now.getNano())
27 | .build();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/java-client/src/main/java/com/couchbase/client/java/search/HighlightStyle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2016 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.java.search;
17 |
18 | import com.couchbase.client.core.annotation.Stability;
19 |
20 | /**
21 | * Enumeration of the highlighting styles recognized by the FTS engine.
22 | *
23 | * @author Simon Baslé
24 | * @author Michael Nitschinger
25 | * @since 2.3.0
26 | */
27 | @Stability.Volatile
28 | public enum HighlightStyle {
29 | HTML,
30 | ANSI,
31 | SERVER_DEFAULT
32 | }
33 |
--------------------------------------------------------------------------------
/scala-client/src/main/scala/com/couchbase/client/scala/search/HighlightStyle.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.scala.search
18 |
19 | /** Enumeration of the highlighting styles recognized by the FTS engine.
20 | *
21 | * @since 1.0.0
22 | */
23 | sealed trait HighlightStyle
24 |
25 | object HighlightStyle {
26 | case object HTML extends HighlightStyle
27 | case object ANSI extends HighlightStyle
28 | case object ServerDefault extends HighlightStyle
29 | }
30 |
--------------------------------------------------------------------------------
/scala-fit-performer/src/main/scala/com/couchbase/client/performer/scala/transaction/TestFailure.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2023 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.performer.scala.transaction;
17 |
18 | public class TestFailure extends RuntimeException {
19 | public TestFailure(String err) {
20 | super(err);
21 | }
22 |
23 | public TestFailure(String err, Throwable cause) {
24 | super(err, cause);
25 | }
26 |
27 | public TestFailure(Throwable cause) {
28 | super(cause);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/cnc/ValueRecorder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.cnc;
18 |
19 | import com.couchbase.client.core.annotation.Stability;
20 |
21 | /**
22 | * Represents a generic value recorder for the metrics interface.
23 | */
24 | @Stability.Volatile
25 | public interface ValueRecorder {
26 |
27 | /**
28 | * Records a specific value.
29 | *
30 | * @param value the value to record.
31 | */
32 | void recordValue(long value);
33 | }
34 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/EventingFunctionNotFoundException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.error;
18 |
19 | import com.couchbase.client.core.error.context.ErrorContext;
20 |
21 | /**
22 | * Raised if the eventing function is not found.
23 | */
24 | public class EventingFunctionNotFoundException extends CouchbaseException {
25 |
26 | public EventingFunctionNotFoundException(String message, ErrorContext ctx) {
27 | super(message, ctx);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/io/netty/HttpChannelContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.io.netty;
18 |
19 | import com.couchbase.client.core.deps.io.netty.channel.ChannelId;
20 |
21 | public class HttpChannelContext {
22 |
23 | private final ChannelId channelId;
24 |
25 | public HttpChannelContext(final ChannelId channelId) {
26 | this.channelId = channelId;
27 | }
28 |
29 | public ChannelId channelId() {
30 | return channelId;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/error/JobQueueFullException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.core.error;
17 |
18 | import com.couchbase.client.core.error.context.ErrorContext;
19 |
20 | /**
21 | * Indicates the analytics server job queue is full
22 | *
23 | * @since 3.0
24 | */
25 | public class JobQueueFullException extends CouchbaseException {
26 |
27 | public JobQueueFullException(final ErrorContext ctx) {
28 | super("Server job queue is full", ctx);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/java-client/src/main/java/com/couchbase/client/java/batch/BatchHelperFailureException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.java.batch;
18 |
19 | import com.couchbase.client.core.error.CouchbaseException;
20 | import com.couchbase.client.core.error.context.ErrorContext;
21 |
22 | public class BatchHelperFailureException extends CouchbaseException {
23 |
24 | public BatchHelperFailureException(String message, Throwable cause, ErrorContext ctx) {
25 | super(message, cause, ctx);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/java-client/src/main/java/com/couchbase/client/java/encryption/databind/jackson/repackaged/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2020 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for encryption during Jackson data binding, compatible with
19 | * the repackaged version of Jackson included in the SDK.
20 | *
21 | * @implNote Please keep these classes in sync with their non-repackaged counterparts
22 | * in {@link com.couchbase.client.java.encryption.databind.jackson}
23 | */
24 | package com.couchbase.client.java.encryption.databind.jackson.repackaged;
25 |
--------------------------------------------------------------------------------
/java-client/src/main/java/com/couchbase/client/java/manager/eventing/EventingFunctionUrlNoAuth.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.java.manager.eventing;
18 |
19 | /**
20 | * No authentication for a URL binding is used.
21 | *
22 | * Created through {@link EventingFunctionUrlAuth#noAuth()}.
23 | */
24 | public class EventingFunctionUrlNoAuth extends EventingFunctionUrlAuth {
25 |
26 | @Override
27 | public String toString() {
28 | return "EventingFunctionUrlNoAuth";
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/scala-client/src/main/scala/com/couchbase/client/scala/env/PasswordAuthenticator.scala:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2019 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.scala.env
17 |
18 | import com.couchbase.client.core.env.{Authenticator, AuthenticatorWrapper}
19 |
20 | case class PasswordAuthenticator(username: String, password: String) extends AuthenticatorWrapper {
21 |
22 | private val inner = com.couchbase.client.core.env.PasswordAuthenticator.create(username, password)
23 |
24 | override protected def wrapped(): Authenticator = inner
25 | }
26 |
--------------------------------------------------------------------------------
/test-utils/src/main/java/com/couchbase/client/test/IgnoreWhenContainer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2025 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.couchbase.client.test;
17 |
18 | import java.lang.annotation.ElementType;
19 | import java.lang.annotation.Retention;
20 | import java.lang.annotation.RetentionPolicy;
21 | import java.lang.annotation.Target;
22 |
23 | @Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.TYPE })
24 | @Retention(RetentionPolicy.RUNTIME)
25 | public @interface IgnoreWhenContainer {
26 | IgnoreWhen[] value();
27 | }
28 |
--------------------------------------------------------------------------------
/columnar-java-client/src/main/java/com/couchbase/columnar/client/java/InvalidCredentialException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2024 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.columnar.client.java;
18 |
19 | import com.couchbase.client.core.cnc.Context;
20 | import com.couchbase.client.core.error.context.ErrorContext;
21 |
22 | public class InvalidCredentialException extends ColumnarException {
23 | InvalidCredentialException(ErrorContext ctx) {
24 | super("User authentication failed. " + ctx.exportAsString(Context.ExportFormat.JSON));
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/core-io/src/main/java/com/couchbase/client/core/cnc/Counter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020 Couchbase, Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.couchbase.client.core.cnc;
18 |
19 | import com.couchbase.client.core.annotation.Stability;
20 |
21 | /**
22 | * Represents a generic Counter interface for metrics.
23 | */
24 | @Stability.Volatile
25 | public interface Counter {
26 |
27 | /**
28 | * Increments the counter by the given number.
29 | * @param number the number to increment the counter by.
30 | */
31 | void incrementBy(long number);
32 |
33 | }
34 |
--------------------------------------------------------------------------------