Refactor the deferred update transaction round handling code to use a new TransactionRoundAwareUpdate interface. Also, rename a few DeferredUpdates methods so they do not give the impression that doUpdates() is always called. Change-Id: Idc4c6d81c4e2ca0ce41bca1e7800f797fa7e37f6
19 lines
542 B
PHP
19 lines
542 B
PHP
<?php
|
|
|
|
/**
|
|
* 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().
|
|
*
|
|
* @since 1.34
|
|
*/
|
|
interface TransactionRoundAwareUpdate {
|
|
/** @var int No transaction round should be used */
|
|
const TRX_ROUND_ABSENT = 1;
|
|
/** @var int A transaction round owned by self::doUpdate should be used */
|
|
const TRX_ROUND_PRESENT = 2;
|
|
|
|
/**
|
|
* @return int One of the class TRX_ROUND_* constants
|
|
*/
|
|
public function getTransactionRoundRequirement();
|
|
}
|