@itwin/core-backend
Version:
iTwin.js backend components
45 lines • 2.11 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module HubAccess
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.LockState = exports.LockConflict = void 0;
const core_bentley_1 = require("@itwin/core-bentley");
const core_common_1 = require("@itwin/core-common");
/** Exception thrown if lock cannot be acquired.
* @beta
*/
class LockConflict extends core_common_1.IModelError {
briefcaseId;
briefcaseAlias;
constructor(
/** Id of Briefcase holding lock */
briefcaseId,
/** Alias of Briefcase holding lock */
briefcaseAlias, msg) {
super(core_bentley_1.IModelHubStatus.LockOwnedByAnotherBriefcase, msg);
this.briefcaseId = briefcaseId;
this.briefcaseAlias = briefcaseAlias;
}
}
exports.LockConflict = LockConflict;
/** The state of a lock. See [Acquiring locks on elements.]($docs/learning/backend/ConcurrencyControl.md#acquiring-locks-on-elements).
* @deprecated in 4.7 - will not be removed until after 2026-06-13. Use [LockState]($common)
* @public
*/
var LockState;
(function (LockState) {
/** The element is not locked */
LockState[LockState["None"] = 0] = "None";
/** Holding a shared lock on an element blocks other users from acquiring the Exclusive lock it. More than one user may acquire the shared lock. */
LockState[LockState["Shared"] = 1] = "Shared";
/** A Lock that permits modifications to an element and blocks other users from making modifications to it.
* Holding an exclusive lock on an "owner" (a model or a parent element), implicitly exclusively locks all its members.
*/
LockState[LockState["Exclusive"] = 2] = "Exclusive";
})(LockState || (exports.LockState = LockState = {}));
//# sourceMappingURL=BackendHubAccess.js.map
;