MDL-69653 cache: final removal of deprecated lock methods.
This commit is contained in:
@@ -14,18 +14,9 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Postgres advisory locking factory.
|
||||
*
|
||||
* @package core
|
||||
* @category lock
|
||||
* @copyright Damyon Wiese 2013
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace core\lock;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
use coding_exception;
|
||||
|
||||
/**
|
||||
* Postgres advisory locking factory.
|
||||
@@ -118,15 +109,10 @@ class postgres_lock_factory implements lock_factory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple locks for the same resource can NOT be held by a single process.
|
||||
*
|
||||
* @deprecated since Moodle 3.10.
|
||||
* @return boolean - false.
|
||||
*/
|
||||
public function supports_recursion() {
|
||||
debugging('The function supports_recursion() is deprecated, please do not use it anymore.',
|
||||
DEBUG_DEVELOPER);
|
||||
return false;
|
||||
throw new coding_exception('The function supports_recursion() has been removed, please do not use it anymore.');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -204,18 +190,10 @@ class postgres_lock_factory implements lock_factory {
|
||||
}
|
||||
|
||||
/**
|
||||
* Extend a lock that was previously obtained with @lock.
|
||||
*
|
||||
* @deprecated since Moodle 3.10.
|
||||
* @param lock $lock - a lock obtained from this factory.
|
||||
* @param int $maxlifetime - the new lifetime for the lock (in seconds).
|
||||
* @return boolean - true if the lock was extended.
|
||||
*/
|
||||
public function extend_lock(lock $lock, $maxlifetime = 86400) {
|
||||
debugging('The function extend_lock() is deprecated, please do not use it anymore.',
|
||||
DEBUG_DEVELOPER);
|
||||
// Not supported by this factory.
|
||||
return false;
|
||||
public function extend_lock() {
|
||||
throw new coding_exception('The function extend_lock() has been removed, please do not use it anymore.');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user