From deaf4a199ac6d4778d36399d2d9ae731a4e6b243 Mon Sep 17 00:00:00 2001 From: Dave Maughan Date: Thu, 26 Jan 2023 09:28:26 +0000 Subject: [PATCH] License (#20) * Add license headers * notice --- LICENSE | 201 ++++++++++++++++++ NOTICE | 2 + README.md | 1 + client/pom.xml | 17 ++ .../oxia/client/AsyncOxiaClientImpl.java | 15 ++ .../oxia/client/ClientConfig.java | 15 ++ .../oxia/client/OxiaClientBuilder.java | 15 ++ .../streamnative/oxia/client/ProtoUtil.java | 15 ++ .../oxia/client/SyncOxiaClientImpl.java | 15 ++ .../oxia/client/api/AsyncOxiaClient.java | 15 ++ .../oxia/client/api/ClientBuilder.java | 15 ++ .../oxia/client/api/GetResult.java | 15 ++ .../oxia/client/api/KeyNotFoundException.java | 15 ++ .../oxia/client/api/Notification.java | 15 ++ .../oxia/client/api/OxiaException.java | 15 ++ .../oxia/client/api/PutResult.java | 15 ++ .../oxia/client/api/SyncOxiaClient.java | 15 ++ .../api/UnexpectedVersionIdException.java | 15 ++ .../streamnative/oxia/client/api/Version.java | 15 ++ .../streamnative/oxia/client/batch/Batch.java | 15 ++ .../oxia/client/batch/BatchManager.java | 15 ++ .../oxia/client/batch/Batcher.java | 15 ++ .../oxia/client/batch/Operation.java | 15 ++ .../oxia/client/grpc/ExponentialBackoff.java | 15 ++ .../oxia/client/grpc/ReceiveWithRecovery.java | 15 ++ .../oxia/client/grpc/Receiver.java | 15 ++ .../client/notify/NotificationManager.java | 15 ++ .../notify/NotificationManagerImpl.java | 15 ++ .../oxia/client/shard/HashRange.java | 15 ++ .../client/shard/HashRangeShardStrategy.java | 15 ++ .../streamnative/oxia/client/shard/Shard.java | 15 ++ .../oxia/client/shard/ShardManager.java | 15 ++ .../oxia/client/shard/ShardStrategy.java | 15 ++ .../shard/UnreachableShardException.java | 15 ++ client/src/main/proto/client.proto | 16 ++ .../oxia/client/ProtoUtilTest.java | 15 ++ .../oxia/client/api/GetResultTest.java | 15 ++ .../oxia/client/api/PutResultTest.java | 15 ++ .../oxia/client/batch/BatchManagerTest.java | 15 ++ .../oxia/client/batch/BatchTest.java | 15 ++ .../oxia/client/batch/BatcherTest.java | 15 ++ .../oxia/client/batch/OperationTest.java | 15 ++ .../client/grpc/ExponentialBackoffTest.java | 15 ++ .../client/grpc/ReceiveWithRecoveryTest.java | 15 ++ .../notify/NotificationManagerImplTest.java | 15 ++ .../shard/HashRangeShardStrategyTest.java | 15 ++ .../oxia/client/shard/HashRangeTest.java | 15 ++ .../oxia/client/shard/ModelFactory.java | 15 ++ .../client/shard/ShardManagerGrpcTest.java | 15 ++ .../oxia/client/shard/ShardManagerTest.java | 15 ++ .../oxia/client/shard/ShardTest.java | 15 ++ .../client/shard/StaticShardStrategy.java | 15 ++ .../oxia/client/shard/Xxh332HashTest.java | 15 ++ etc/APACHE-2.txt | 13 ++ etc/checkstyle.xml | 17 ++ etc/findbugsExclude.xml | 17 ++ pom.xml | 59 +++++ testcontainers/pom.xml | 17 ++ .../oxia/testcontainers/OxiaContainer.java | 15 ++ .../oxia/testcontainers/OxiaContainerIT.java | 15 ++ 60 files changed, 1110 insertions(+) create mode 100644 LICENSE create mode 100644 NOTICE create mode 100644 etc/APACHE-2.txt diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..261eeb9e --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NOTICE b/NOTICE new file mode 100644 index 00000000..24a2b5c3 --- /dev/null +++ b/NOTICE @@ -0,0 +1,2 @@ +StreamNative Oxia +Copyright 2023 StreamNative, Inc. diff --git a/README.md b/README.md index eff636e2..46a0fb36 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,5 @@ Common build actions: | Skip Checkstyle standards check | `mvn clean verify -Dcheckstyle.skip` | | Skip Spotless formatting check | `mvn clean verify -Dspotless.check.skip` | | Format code | `mvn spotless:apply` | +| Generate license headers | `mvn license:format` | diff --git a/client/pom.xml b/client/pom.xml index c843d53b..4d0f5687 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -1,4 +1,21 @@ + 4.0.0 diff --git a/client/src/main/java/io/streamnative/oxia/client/AsyncOxiaClientImpl.java b/client/src/main/java/io/streamnative/oxia/client/AsyncOxiaClientImpl.java index 81890610..433a66b2 100644 --- a/client/src/main/java/io/streamnative/oxia/client/AsyncOxiaClientImpl.java +++ b/client/src/main/java/io/streamnative/oxia/client/AsyncOxiaClientImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client; import static java.util.stream.Collectors.toList; diff --git a/client/src/main/java/io/streamnative/oxia/client/ClientConfig.java b/client/src/main/java/io/streamnative/oxia/client/ClientConfig.java index cf8d469c..e6d70e9f 100644 --- a/client/src/main/java/io/streamnative/oxia/client/ClientConfig.java +++ b/client/src/main/java/io/streamnative/oxia/client/ClientConfig.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client; diff --git a/client/src/main/java/io/streamnative/oxia/client/OxiaClientBuilder.java b/client/src/main/java/io/streamnative/oxia/client/OxiaClientBuilder.java index 12ed6d0e..74dc620b 100644 --- a/client/src/main/java/io/streamnative/oxia/client/OxiaClientBuilder.java +++ b/client/src/main/java/io/streamnative/oxia/client/OxiaClientBuilder.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client; diff --git a/client/src/main/java/io/streamnative/oxia/client/ProtoUtil.java b/client/src/main/java/io/streamnative/oxia/client/ProtoUtil.java index b21a16fe..61549334 100644 --- a/client/src/main/java/io/streamnative/oxia/client/ProtoUtil.java +++ b/client/src/main/java/io/streamnative/oxia/client/ProtoUtil.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client; diff --git a/client/src/main/java/io/streamnative/oxia/client/SyncOxiaClientImpl.java b/client/src/main/java/io/streamnative/oxia/client/SyncOxiaClientImpl.java index 0f35870e..ddef1b60 100644 --- a/client/src/main/java/io/streamnative/oxia/client/SyncOxiaClientImpl.java +++ b/client/src/main/java/io/streamnative/oxia/client/SyncOxiaClientImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client; diff --git a/client/src/main/java/io/streamnative/oxia/client/api/AsyncOxiaClient.java b/client/src/main/java/io/streamnative/oxia/client/api/AsyncOxiaClient.java index e2153576..2a45d06d 100644 --- a/client/src/main/java/io/streamnative/oxia/client/api/AsyncOxiaClient.java +++ b/client/src/main/java/io/streamnative/oxia/client/api/AsyncOxiaClient.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; diff --git a/client/src/main/java/io/streamnative/oxia/client/api/ClientBuilder.java b/client/src/main/java/io/streamnative/oxia/client/api/ClientBuilder.java index fcc33240..ad5f13e8 100644 --- a/client/src/main/java/io/streamnative/oxia/client/api/ClientBuilder.java +++ b/client/src/main/java/io/streamnative/oxia/client/api/ClientBuilder.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; diff --git a/client/src/main/java/io/streamnative/oxia/client/api/GetResult.java b/client/src/main/java/io/streamnative/oxia/client/api/GetResult.java index ff60e380..704ecc2a 100644 --- a/client/src/main/java/io/streamnative/oxia/client/api/GetResult.java +++ b/client/src/main/java/io/streamnative/oxia/client/api/GetResult.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; diff --git a/client/src/main/java/io/streamnative/oxia/client/api/KeyNotFoundException.java b/client/src/main/java/io/streamnative/oxia/client/api/KeyNotFoundException.java index c1f42fa6..7066b586 100644 --- a/client/src/main/java/io/streamnative/oxia/client/api/KeyNotFoundException.java +++ b/client/src/main/java/io/streamnative/oxia/client/api/KeyNotFoundException.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; diff --git a/client/src/main/java/io/streamnative/oxia/client/api/Notification.java b/client/src/main/java/io/streamnative/oxia/client/api/Notification.java index a5bfaaa1..17118474 100644 --- a/client/src/main/java/io/streamnative/oxia/client/api/Notification.java +++ b/client/src/main/java/io/streamnative/oxia/client/api/Notification.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; diff --git a/client/src/main/java/io/streamnative/oxia/client/api/OxiaException.java b/client/src/main/java/io/streamnative/oxia/client/api/OxiaException.java index df8028dc..6eae3907 100644 --- a/client/src/main/java/io/streamnative/oxia/client/api/OxiaException.java +++ b/client/src/main/java/io/streamnative/oxia/client/api/OxiaException.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; /** A super-class of exceptions describing errors that occurred on an Oxia server. */ diff --git a/client/src/main/java/io/streamnative/oxia/client/api/PutResult.java b/client/src/main/java/io/streamnative/oxia/client/api/PutResult.java index 5e7dd591..e6fca19a 100644 --- a/client/src/main/java/io/streamnative/oxia/client/api/PutResult.java +++ b/client/src/main/java/io/streamnative/oxia/client/api/PutResult.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; diff --git a/client/src/main/java/io/streamnative/oxia/client/api/SyncOxiaClient.java b/client/src/main/java/io/streamnative/oxia/client/api/SyncOxiaClient.java index 114277e5..6f62b59c 100644 --- a/client/src/main/java/io/streamnative/oxia/client/api/SyncOxiaClient.java +++ b/client/src/main/java/io/streamnative/oxia/client/api/SyncOxiaClient.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; diff --git a/client/src/main/java/io/streamnative/oxia/client/api/UnexpectedVersionIdException.java b/client/src/main/java/io/streamnative/oxia/client/api/UnexpectedVersionIdException.java index fede5d6a..e0fd18d7 100644 --- a/client/src/main/java/io/streamnative/oxia/client/api/UnexpectedVersionIdException.java +++ b/client/src/main/java/io/streamnative/oxia/client/api/UnexpectedVersionIdException.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; diff --git a/client/src/main/java/io/streamnative/oxia/client/api/Version.java b/client/src/main/java/io/streamnative/oxia/client/api/Version.java index a368ee8e..7bb34a12 100644 --- a/client/src/main/java/io/streamnative/oxia/client/api/Version.java +++ b/client/src/main/java/io/streamnative/oxia/client/api/Version.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; import static io.streamnative.oxia.client.ProtoUtil.VersionIdNotExists; diff --git a/client/src/main/java/io/streamnative/oxia/client/batch/Batch.java b/client/src/main/java/io/streamnative/oxia/client/batch/Batch.java index 995c116a..9495636f 100644 --- a/client/src/main/java/io/streamnative/oxia/client/batch/Batch.java +++ b/client/src/main/java/io/streamnative/oxia/client/batch/Batch.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.batch; import static io.streamnative.oxia.client.ProtoUtil.longToUint32; diff --git a/client/src/main/java/io/streamnative/oxia/client/batch/BatchManager.java b/client/src/main/java/io/streamnative/oxia/client/batch/BatchManager.java index fc8c3c0c..900c2cd6 100644 --- a/client/src/main/java/io/streamnative/oxia/client/batch/BatchManager.java +++ b/client/src/main/java/io/streamnative/oxia/client/batch/BatchManager.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.batch; import static java.util.stream.Collectors.toList; diff --git a/client/src/main/java/io/streamnative/oxia/client/batch/Batcher.java b/client/src/main/java/io/streamnative/oxia/client/batch/Batcher.java index fca14a48..fd7ad378 100644 --- a/client/src/main/java/io/streamnative/oxia/client/batch/Batcher.java +++ b/client/src/main/java/io/streamnative/oxia/client/batch/Batcher.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.batch; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/client/src/main/java/io/streamnative/oxia/client/batch/Operation.java b/client/src/main/java/io/streamnative/oxia/client/batch/Operation.java index dd688b90..59451ebb 100644 --- a/client/src/main/java/io/streamnative/oxia/client/batch/Operation.java +++ b/client/src/main/java/io/streamnative/oxia/client/batch/Operation.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.batch; import static io.streamnative.oxia.client.ProtoUtil.VersionIdNotExists; diff --git a/client/src/main/java/io/streamnative/oxia/client/grpc/ExponentialBackoff.java b/client/src/main/java/io/streamnative/oxia/client/grpc/ExponentialBackoff.java index abfa3d84..f71c375e 100644 --- a/client/src/main/java/io/streamnative/oxia/client/grpc/ExponentialBackoff.java +++ b/client/src/main/java/io/streamnative/oxia/client/grpc/ExponentialBackoff.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.grpc; import static java.util.concurrent.TimeUnit.SECONDS; diff --git a/client/src/main/java/io/streamnative/oxia/client/grpc/ReceiveWithRecovery.java b/client/src/main/java/io/streamnative/oxia/client/grpc/ReceiveWithRecovery.java index adb07d7f..19b07b01 100644 --- a/client/src/main/java/io/streamnative/oxia/client/grpc/ReceiveWithRecovery.java +++ b/client/src/main/java/io/streamnative/oxia/client/grpc/ReceiveWithRecovery.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.grpc; import static lombok.AccessLevel.PUBLIC; diff --git a/client/src/main/java/io/streamnative/oxia/client/grpc/Receiver.java b/client/src/main/java/io/streamnative/oxia/client/grpc/Receiver.java index 056f3501..833a6c57 100644 --- a/client/src/main/java/io/streamnative/oxia/client/grpc/Receiver.java +++ b/client/src/main/java/io/streamnative/oxia/client/grpc/Receiver.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.grpc; diff --git a/client/src/main/java/io/streamnative/oxia/client/notify/NotificationManager.java b/client/src/main/java/io/streamnative/oxia/client/notify/NotificationManager.java index a4e1cb14..ddf9cfb4 100644 --- a/client/src/main/java/io/streamnative/oxia/client/notify/NotificationManager.java +++ b/client/src/main/java/io/streamnative/oxia/client/notify/NotificationManager.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.notify; public interface NotificationManager extends AutoCloseable { diff --git a/client/src/main/java/io/streamnative/oxia/client/notify/NotificationManagerImpl.java b/client/src/main/java/io/streamnative/oxia/client/notify/NotificationManagerImpl.java index d8d0c472..3458245a 100644 --- a/client/src/main/java/io/streamnative/oxia/client/notify/NotificationManagerImpl.java +++ b/client/src/main/java/io/streamnative/oxia/client/notify/NotificationManagerImpl.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.notify; import static io.grpc.Status.fromThrowable; diff --git a/client/src/main/java/io/streamnative/oxia/client/shard/HashRange.java b/client/src/main/java/io/streamnative/oxia/client/shard/HashRange.java index 39a700d8..69786fa3 100644 --- a/client/src/main/java/io/streamnative/oxia/client/shard/HashRange.java +++ b/client/src/main/java/io/streamnative/oxia/client/shard/HashRange.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; import static io.streamnative.oxia.client.ProtoUtil.uint32ToLong; diff --git a/client/src/main/java/io/streamnative/oxia/client/shard/HashRangeShardStrategy.java b/client/src/main/java/io/streamnative/oxia/client/shard/HashRangeShardStrategy.java index fd71e6bd..0f46c35c 100644 --- a/client/src/main/java/io/streamnative/oxia/client/shard/HashRangeShardStrategy.java +++ b/client/src/main/java/io/streamnative/oxia/client/shard/HashRangeShardStrategy.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; diff --git a/client/src/main/java/io/streamnative/oxia/client/shard/Shard.java b/client/src/main/java/io/streamnative/oxia/client/shard/Shard.java index b81a0784..6dc08d94 100644 --- a/client/src/main/java/io/streamnative/oxia/client/shard/Shard.java +++ b/client/src/main/java/io/streamnative/oxia/client/shard/Shard.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; import static java.util.stream.Collectors.toSet; diff --git a/client/src/main/java/io/streamnative/oxia/client/shard/ShardManager.java b/client/src/main/java/io/streamnative/oxia/client/shard/ShardManager.java index 434ce528..9f4ae382 100644 --- a/client/src/main/java/io/streamnative/oxia/client/shard/ShardManager.java +++ b/client/src/main/java/io/streamnative/oxia/client/shard/ShardManager.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; import static io.grpc.Status.fromThrowable; diff --git a/client/src/main/java/io/streamnative/oxia/client/shard/ShardStrategy.java b/client/src/main/java/io/streamnative/oxia/client/shard/ShardStrategy.java index 891bf653..e2f377f1 100644 --- a/client/src/main/java/io/streamnative/oxia/client/shard/ShardStrategy.java +++ b/client/src/main/java/io/streamnative/oxia/client/shard/ShardStrategy.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; diff --git a/client/src/main/java/io/streamnative/oxia/client/shard/UnreachableShardException.java b/client/src/main/java/io/streamnative/oxia/client/shard/UnreachableShardException.java index 5de0f40f..c6678766 100644 --- a/client/src/main/java/io/streamnative/oxia/client/shard/UnreachableShardException.java +++ b/client/src/main/java/io/streamnative/oxia/client/shard/UnreachableShardException.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; diff --git a/client/src/main/proto/client.proto b/client/src/main/proto/client.proto index df73ef9c..a3ae802a 100644 --- a/client/src/main/proto/client.proto +++ b/client/src/main/proto/client.proto @@ -1,3 +1,19 @@ +// +// Copyright © 2022-2023 StreamNative Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + /** * OxiaClient */ diff --git a/client/src/test/java/io/streamnative/oxia/client/ProtoUtilTest.java b/client/src/test/java/io/streamnative/oxia/client/ProtoUtilTest.java index a01bc874..06e7d250 100644 --- a/client/src/test/java/io/streamnative/oxia/client/ProtoUtilTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/ProtoUtilTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client; import static org.assertj.core.api.Assertions.assertThat; diff --git a/client/src/test/java/io/streamnative/oxia/client/api/GetResultTest.java b/client/src/test/java/io/streamnative/oxia/client/api/GetResultTest.java index 75f4735c..106fa057 100644 --- a/client/src/test/java/io/streamnative/oxia/client/api/GetResultTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/api/GetResultTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/client/src/test/java/io/streamnative/oxia/client/api/PutResultTest.java b/client/src/test/java/io/streamnative/oxia/client/api/PutResultTest.java index a65b445b..d9185987 100644 --- a/client/src/test/java/io/streamnative/oxia/client/api/PutResultTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/api/PutResultTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.api; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/client/src/test/java/io/streamnative/oxia/client/batch/BatchManagerTest.java b/client/src/test/java/io/streamnative/oxia/client/batch/BatchManagerTest.java index de8f3398..374eb77c 100644 --- a/client/src/test/java/io/streamnative/oxia/client/batch/BatchManagerTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/batch/BatchManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.batch; import static org.assertj.core.api.Assertions.assertThat; diff --git a/client/src/test/java/io/streamnative/oxia/client/batch/BatchTest.java b/client/src/test/java/io/streamnative/oxia/client/batch/BatchTest.java index 57c4a40a..da986eb7 100644 --- a/client/src/test/java/io/streamnative/oxia/client/batch/BatchTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/batch/BatchTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.batch; import static io.streamnative.oxia.proto.OxiaClientGrpc.OxiaClientBlockingStub; diff --git a/client/src/test/java/io/streamnative/oxia/client/batch/BatcherTest.java b/client/src/test/java/io/streamnative/oxia/client/batch/BatcherTest.java index 745bbd24..25640ba0 100644 --- a/client/src/test/java/io/streamnative/oxia/client/batch/BatcherTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/batch/BatcherTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.batch; import static java.util.concurrent.TimeUnit.MILLISECONDS; diff --git a/client/src/test/java/io/streamnative/oxia/client/batch/OperationTest.java b/client/src/test/java/io/streamnative/oxia/client/batch/OperationTest.java index e6952cb1..f14322ef 100644 --- a/client/src/test/java/io/streamnative/oxia/client/batch/OperationTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/batch/OperationTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.batch; import static io.streamnative.oxia.proto.Status.KEY_NOT_FOUND; diff --git a/client/src/test/java/io/streamnative/oxia/client/grpc/ExponentialBackoffTest.java b/client/src/test/java/io/streamnative/oxia/client/grpc/ExponentialBackoffTest.java index 7985519f..d73a1efe 100644 --- a/client/src/test/java/io/streamnative/oxia/client/grpc/ExponentialBackoffTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/grpc/ExponentialBackoffTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.grpc; import static org.assertj.core.api.Assertions.assertThat; diff --git a/client/src/test/java/io/streamnative/oxia/client/grpc/ReceiveWithRecoveryTest.java b/client/src/test/java/io/streamnative/oxia/client/grpc/ReceiveWithRecoveryTest.java index f54df974..9e142b5d 100644 --- a/client/src/test/java/io/streamnative/oxia/client/grpc/ReceiveWithRecoveryTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/grpc/ReceiveWithRecoveryTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.grpc; import static org.assertj.core.api.Assertions.assertThat; diff --git a/client/src/test/java/io/streamnative/oxia/client/notify/NotificationManagerImplTest.java b/client/src/test/java/io/streamnative/oxia/client/notify/NotificationManagerImplTest.java index 838d285e..16ea5ebe 100644 --- a/client/src/test/java/io/streamnative/oxia/client/notify/NotificationManagerImplTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/notify/NotificationManagerImplTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.notify; import static io.streamnative.oxia.proto.NotificationType.KeyCreated; diff --git a/client/src/test/java/io/streamnative/oxia/client/shard/HashRangeShardStrategyTest.java b/client/src/test/java/io/streamnative/oxia/client/shard/HashRangeShardStrategyTest.java index 941e9948..dca9b7b6 100644 --- a/client/src/test/java/io/streamnative/oxia/client/shard/HashRangeShardStrategyTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/shard/HashRangeShardStrategyTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; import static org.assertj.core.api.Assertions.assertThat; diff --git a/client/src/test/java/io/streamnative/oxia/client/shard/HashRangeTest.java b/client/src/test/java/io/streamnative/oxia/client/shard/HashRangeTest.java index ca431cbb..eabb8eda 100644 --- a/client/src/test/java/io/streamnative/oxia/client/shard/HashRangeTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/shard/HashRangeTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; import static org.assertj.core.api.Assertions.assertThat; diff --git a/client/src/test/java/io/streamnative/oxia/client/shard/ModelFactory.java b/client/src/test/java/io/streamnative/oxia/client/shard/ModelFactory.java index 3cf5e921..27ac67c6 100644 --- a/client/src/test/java/io/streamnative/oxia/client/shard/ModelFactory.java +++ b/client/src/test/java/io/streamnative/oxia/client/shard/ModelFactory.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; diff --git a/client/src/test/java/io/streamnative/oxia/client/shard/ShardManagerGrpcTest.java b/client/src/test/java/io/streamnative/oxia/client/shard/ShardManagerGrpcTest.java index 278fbaf8..0e64ebf4 100644 --- a/client/src/test/java/io/streamnative/oxia/client/shard/ShardManagerGrpcTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/shard/ShardManagerGrpcTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; import static io.streamnative.oxia.client.shard.ModelFactory.newShardAssignmentResponse; diff --git a/client/src/test/java/io/streamnative/oxia/client/shard/ShardManagerTest.java b/client/src/test/java/io/streamnative/oxia/client/shard/ShardManagerTest.java index ffa42c0e..10093f03 100644 --- a/client/src/test/java/io/streamnative/oxia/client/shard/ShardManagerTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/shard/ShardManagerTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; import static java.util.Collections.emptyList; diff --git a/client/src/test/java/io/streamnative/oxia/client/shard/ShardTest.java b/client/src/test/java/io/streamnative/oxia/client/shard/ShardTest.java index 042f0e91..9ea69c97 100644 --- a/client/src/test/java/io/streamnative/oxia/client/shard/ShardTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/shard/ShardTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; import static org.assertj.core.api.Assertions.assertThat; diff --git a/client/src/test/java/io/streamnative/oxia/client/shard/StaticShardStrategy.java b/client/src/test/java/io/streamnative/oxia/client/shard/StaticShardStrategy.java index 2f872354..0d7c40a7 100644 --- a/client/src/test/java/io/streamnative/oxia/client/shard/StaticShardStrategy.java +++ b/client/src/test/java/io/streamnative/oxia/client/shard/StaticShardStrategy.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; import static lombok.AccessLevel.PACKAGE; diff --git a/client/src/test/java/io/streamnative/oxia/client/shard/Xxh332HashTest.java b/client/src/test/java/io/streamnative/oxia/client/shard/Xxh332HashTest.java index 3f82a041..24794a1b 100644 --- a/client/src/test/java/io/streamnative/oxia/client/shard/Xxh332HashTest.java +++ b/client/src/test/java/io/streamnative/oxia/client/shard/Xxh332HashTest.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.client.shard; import static io.streamnative.oxia.client.shard.HashRangeShardStrategy.Xxh332Hash; diff --git a/etc/APACHE-2.txt b/etc/APACHE-2.txt new file mode 100644 index 00000000..e328c6ec --- /dev/null +++ b/etc/APACHE-2.txt @@ -0,0 +1,13 @@ +Copyright © ${license.git.copyrightYears} ${owner} + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/etc/checkstyle.xml b/etc/checkstyle.xml index de0589bb..2d20b961 100644 --- a/etc/checkstyle.xml +++ b/etc/checkstyle.xml @@ -1,4 +1,21 @@ + diff --git a/etc/findbugsExclude.xml b/etc/findbugsExclude.xml index ac1ef412..46317434 100644 --- a/etc/findbugsExclude.xml +++ b/etc/findbugsExclude.xml @@ -1,3 +1,20 @@ + diff --git a/pom.xml b/pom.xml index d30660a3..70156f40 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,21 @@ + 4.0.0 @@ -9,6 +26,20 @@ pom Oxia Implementations for Java + 2022 + + + StreamNative Inc. + https://streamnative.io/ + + + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + + + client testcontainers @@ -30,6 +61,7 @@ 3.2.0 0.8.8 + 4.1 3.10.1 3.1.0 3.0.0-M7 @@ -160,6 +192,33 @@ + + + com.mycila + license-maven-plugin + ${license.plugin.version} + +
etc/APACHE-2.txt
+ + DOUBLESLASH_STYLE + +
+ + + com.mycila + license-maven-plugin-git + ${license.plugin.version} + + + + + + check + + process-sources + + +
org.apache.maven.plugins diff --git a/testcontainers/pom.xml b/testcontainers/pom.xml index 7e559453..ab5a40b4 100644 --- a/testcontainers/pom.xml +++ b/testcontainers/pom.xml @@ -1,4 +1,21 @@ + 4.0.0 diff --git a/testcontainers/src/main/java/io/streamnative/oxia/testcontainers/OxiaContainer.java b/testcontainers/src/main/java/io/streamnative/oxia/testcontainers/OxiaContainer.java index 453a8d7e..d7f38906 100644 --- a/testcontainers/src/main/java/io/streamnative/oxia/testcontainers/OxiaContainer.java +++ b/testcontainers/src/main/java/io/streamnative/oxia/testcontainers/OxiaContainer.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.testcontainers; import static java.time.temporal.ChronoUnit.SECONDS; diff --git a/testcontainers/src/test/java/io/streamnative/oxia/testcontainers/OxiaContainerIT.java b/testcontainers/src/test/java/io/streamnative/oxia/testcontainers/OxiaContainerIT.java index cd0a4f42..510ef970 100644 --- a/testcontainers/src/test/java/io/streamnative/oxia/testcontainers/OxiaContainerIT.java +++ b/testcontainers/src/test/java/io/streamnative/oxia/testcontainers/OxiaContainerIT.java @@ -1,3 +1,18 @@ +/* + * Copyright © 2022-2023 StreamNative Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.streamnative.oxia.testcontainers; import static org.junit.Assert.assertEquals;