public interface BatchUpdateOp extends RepoOnlyOp
BatchUpdate
operations that touch a change.
Each operation has updateChange(ChangeContext)
called once the change is read in a
transaction. Ops are associated with updates via BatchUpdate.addOp(com.google.gerrit.reviewdb.client.Change.Id, BatchUpdateOp)
.
Usually, a single BatchUpdateOp
instance is only associated with a single change, i.e.
addOp
is only called once with that instance. Additionally, each method in BatchUpdateOp
is called at most once per BatchUpdate
execution.
Taken together, these two properties mean an instance may communicate between phases by storing data in private fields, and a single instance must not be reused.
Modifier and Type | Method and Description |
---|---|
default boolean |
updateChange(ChangeContext ctx)
Override this method to modify a change.
|
postUpdate, updateRepo
default boolean updateChange(ChangeContext ctx) throws java.lang.Exception
ctx
- contextjava.lang.Exception