Introduce LockService interface to BriefcaseConnection#9060
Merged
Conversation
ben-polinsky
reviewed
Mar 5, 2026
Member
|
This looks reasonable to me. Do you have an implementation of |
Contributor
Author
Partial one exists, but currently it's internal (you can find a link in linked issue).
At some point, maybe. Currently, no one is using this so there is nothing to test. Also, interface is simple enough right now so writing a simple mock should not be difficult for anyone. |
rschili
reviewed
Mar 6, 2026
rschili
reviewed
Mar 6, 2026
ben-polinsky
approved these changes
Mar 6, 2026
rschili
approved these changes
Mar 9, 2026
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.
Motivation
Tools and other UI elements sometimes need to know whether element is locked and who owns the lock. Tools may query this information frequently and expect a quick response (e.g. on element hover tools want to show that element is not available due to element being locked by other user).
Some generic core level API is needed to make sure that solution is reachable from any package.
Solution
Have a locks cache available via
BriefcaseConnection.Cache would prefetch locks from iModelHub and regularly update them. Cache would be abstracted away via
LockServiceinterface and implementation would be provided by applications for now (later down the line, some generic default implementation could be available in core packages).Benefits of having this available via
BriefcaseConnection: