CBL-8080: Add JNI support for per-transport MultipeerReplicator status#472
Open
CBL-8080: Add JNI support for per-transport MultipeerReplicator status#472
Conversation
Collaborator
pasin
commented
Apr 24, 2026
- Implement JNI for per-transport status notifications.
- Implement JNI for getting status by transport.
- Clean up JNI API comments in the header file.
- Implement JNI for per-transport status notifications. - Implement JNI for getting status by transport. - Clean up JNI API comments in the header file.
There was a problem hiding this comment.
Pull request overview
Adds JNI plumbing to expose per-transport MultipeerReplicator status to the Java layer, including a native getStatus API and updated callback wiring, plus small related constant/header comment updates.
Changes:
- Introduces
PeerSyncProtocols.NONEand adds protocol documentation inC4Constants. - Updates the multipeer JNI callback
onSyncStatusChangedto pass a newC4PeerSyncStatusJava object, and adds a nativegetStatus(peer, protocol)implementation. - Cleans up/updates the generated JNI header comments for
NativeC4MultipeerReplicator.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| common/main/java/com/couchbase/lite/internal/core/C4Constants.java | Adds/clarifies peer sync protocol constants, including a new NONE value. |
| common/main/cpp/native_c4multipeerreplicator.cc | Wires per-transport status through JNI via C4PeerSyncStatus, updates callback signature, and adds getStatus. |
| common/main/cpp/com_couchbase_lite_internal_core_impl_NativeC4MultipeerReplicator.h | Updates JNI header comment blocks to match the current native API (including new getStatus). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.