Package com.google.gerrit.server.update
Interface BatchUpdateOp
-
- All Superinterfaces:
RepoOnlyOp
- All Known Subinterfaces:
InsertChangeOp
- All Known Implementing Classes:
AbandonOp
,AddReviewersOp
,AddToAttentionSetOp
,AttentionSetUnchangedOp
,ChangeInserter
,DeleteChangeOp
,DeleteReviewerByEmailOp
,DeleteReviewerOp
,MergedByPushOp
,PatchSetInserter
,PublishCommentsOp
,RebaseChangeOp
,RemoveFromAttentionSetOp
,ResetCherryPickOp
,ReviewerOp
,SetAssigneeOp
,SetCherryPickOp
,SetHashtagsOp
,SetPrivateOp
,SetTopicOp
,StoreSubmitRequirementsOp
,WorkInProgressOp
public interface BatchUpdateOp extends RepoOnlyOp
Interface forBatchUpdate
operations that touch a change.Each operation has
updateChange(ChangeContext)
called once the change is read in a transaction. Ops are associated with updates viaBatchUpdate.addOp(com.google.gerrit.entities.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 inBatchUpdateOp
is called at most once perBatchUpdate
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.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
updateChange(ChangeContext ctx)
Override this method to modify a change.-
Methods inherited from interface com.google.gerrit.server.update.RepoOnlyOp
postUpdate, updateRepo
-
-
-
-
Method Detail
-
updateChange
default boolean updateChange(ChangeContext ctx) throws Exception
Override this method to modify a change.- Parameters:
ctx
- context- Returns:
- whether anything was changed that might require a write to the metadata storage.
- Throws:
Exception
-
-