2019-05-21 21:52:57 +00:00
|
|
|
<?php
|
|
|
|
|
|
2023-11-21 21:08:14 +00:00
|
|
|
namespace MediaWiki\Deferred;
|
|
|
|
|
|
2019-05-21 21:52:57 +00:00
|
|
|
/**
|
|
|
|
|
* Deferrable update that specifies whether it must run outside of any explicit
|
|
|
|
|
* LBFactory transaction round or must run inside of a round owned by doUpdate().
|
|
|
|
|
*
|
2020-07-13 09:05:49 +00:00
|
|
|
* @stable to implement
|
2020-06-26 14:23:02 +00:00
|
|
|
*
|
2019-05-21 21:52:57 +00:00
|
|
|
* @since 1.34
|
|
|
|
|
*/
|
|
|
|
|
interface TransactionRoundAwareUpdate {
|
2019-03-19 16:03:36 +00:00
|
|
|
/** @var int No explicit transaction round should be used */
|
2020-05-12 21:42:08 +00:00
|
|
|
public const TRX_ROUND_ABSENT = 1;
|
2019-03-19 16:03:36 +00:00
|
|
|
/** @var int An explicit transaction round owned by self::doUpdate should be used */
|
2020-05-12 21:42:08 +00:00
|
|
|
public const TRX_ROUND_PRESENT = 2;
|
2019-05-21 21:52:57 +00:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return int One of the class TRX_ROUND_* constants
|
|
|
|
|
*/
|
|
|
|
|
public function getTransactionRoundRequirement();
|
|
|
|
|
}
|
2023-11-21 21:08:14 +00:00
|
|
|
|
2024-03-07 21:56:58 +00:00
|
|
|
/** @deprecated class alias since 1.42 */
|
2023-11-21 21:08:14 +00:00
|
|
|
class_alias( TransactionRoundAwareUpdate::class, 'TransactionRoundAwareUpdate' );
|