Skip to content

Commit 7c1fbf6

Browse files
committed
A few more release -> abandon.
1 parent 17e2b0a commit 7c1fbf6

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

core/backend/src/LockControl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export interface LockControl {
7373

7474
/** Release all locks currently held by this briefcase from the lock server after editing the associated elements.
7575
* This is typically done on your behalf by [[BriefcaseDb.pushChanges]].
76-
* If you are abandoning changes instead of pushing them, you should call [[releaseAllLocksAfterAbandon]] instead.
76+
* If you are abandoning changes instead of pushing them, you should call [[abandonAllLocks]] instead.
7777
* You may want to do it manually when abandoning all of your briefcase's local changes.
7878
* You cannot release your locks if your briefcase contains local changes.
7979
* @throws Error if the briefcase has local changes, or if any other error occurs while releasing the locks.

core/backend/src/TxnManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ export class TxnManager {
13091309

13101310
/** Destroy the record of all local changes that have yet to be saved and/or pushed.
13111311
* This permanently eradicates your changes - use with caution!
1312-
* Typically, callers will want to subsequently use [[LockControl.releaseAllLocksAfterAbandon]].
1312+
* Typically, callers will want to subsequently use [[LockControl.abandonAllLocks]].
13131313
* After calling this function, [[hasLocalChanges]], [[hasPendingTxns]], and [[hasUnsavedChanges]] will all be `false`.
13141314
*/
13151315
public deleteAllTxns(): void {

core/backend/src/internal/ServerBasedLocks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export class ServerBasedLocks implements LockControl {
238238
return this.acquireAllLocks(locks);
239239
}
240240

241-
private async releaseLocksAfterAbandon(locks: LockMap): Promise<void> {
241+
private async abandonLocks(locks: LockMap): Promise<void> {
242242
if (IModelHost[_hubAccess].abandonLocks === undefined) {
243243
// If the IModelHub doesn't support an explicit abandon, call release with a null changeset.
244244
await IModelHost[_hubAccess].acquireLocks({
@@ -305,7 +305,7 @@ export class ServerBasedLocks implements LockControl {
305305
});
306306

307307
// Release the locks on the server.
308-
await this.releaseLocksAfterAbandon(locksToRelease);
308+
await this.abandonLocks(locksToRelease);
309309

310310
// Restore each lock to its previous state (if any) in the local cache. Usually this means deleting it.
311311
for (const [elementId, previousState] of allTxnLocks) {

0 commit comments

Comments
 (0)