/*! * Copyright 2020 Ron Buckton * * 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. */ import { Disposable } from "@esfx/disposable"; /** * Indicates a scope for transactional changes to a `Graph`. */ export declare class GraphTransactionScope implements Disposable { private static _current?; private static _enlistment?; private _parent?; private _completed; private _aborted; private _disposed; /** * Starts a new graph transaction scope, which allows you to * conditionally commit or roll-back changes to a `Graph`. */ constructor(); /** * Marks the scope as successfully completed. When the scope * is disposed, changes will be committed. */ setComplete(): void; /** * Disposes of the scope and indicates changes should be committed * (if `setComplete()` was called), or rolled back (if `setComplete` was not * called). */ dispose(): void; /** * Disposes of the scope and indicates changes should be committed * (if `setComplete()` was called), or rolled back (if `setComplete()` was * not called). * * NOTE: This is an alias for `dispose()`. */ [Disposable.dispose](): void; private _commit; private _rollback; }