Пример #1
0
        public override void Stop()
        {
            _started = false;
            // Database is no longer available for use
            // Deny beginning new transactions
            _databaseAvailabilityGuard.require(_availabilityRequirement);

            // Await transactions stopped
            AwaitTransactionsClosedWithinTimeout();
        }
Пример #2
0
 private void RaiseAvailabilityGuard(AvailabilityRequirement requirement)
 {
     // it is possible for the local database to be created and stopped right after that to perform a store copy
     // in this case we need to impose new requirement and drop the old one
     _availabilityGuard.require(requirement);
     if (_currentRequirement != null)
     {
         DropAvailabilityGuard();
     }
     _currentRequirement = requirement;
 }