protected function DrupalCommerceEntityController::releaseLock in Commerce Core 7
Checks the list of tracked locked entities, and if it's empty, commits the transaction in order to remove the acquired locks.
The transaction is not necessarily committed immediately. Drupal will commit it as soon as possible given the state of the transaction stack.
2 calls to DrupalCommerceEntityController::releaseLock()
- DrupalCommerceEntityController::resetCache in includes/
commerce.controller.inc - Implements DrupalEntityControllerInterface::resetCache().
- DrupalCommerceEntityController::save in includes/
commerce.controller.inc - Permanently saves the given entity.
File
- includes/
commerce.controller.inc, line 116 - Provides a central controller for Drupal Commerce.
Class
- DrupalCommerceEntityController
- Default implementation of DrupalCommerceEntityControllerInterface.
Code
protected function releaseLock() {
if (isset($this->entityInfo['locking mode']) && $this->entityInfo['locking mode'] == 'pessimistic') {
if (empty($this->lockedEntities)) {
unset($this->controllerTransaction);
}
}
}